repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
pr71387.C
blob
56f4a4d38b4c79b2c9e18f869adfcbb1e8e9059c
1
// PR middle-end/71387
2
// { dg-do compile }
3
// { dg-options "-Og" }
4
5
struct A
6
{
7
A ();
8
inline A (const A &);
9
};
10
11
struct B
12
{
13
explicit B (unsigned long) : b(0), c(1) {}
14
A a;
15
unsigned long b;
16
int c;
17
};
18
19
struct C {};
20
21
struct D
22
{
23
explicit D (const C *) {}
24
};
25
26
struct E : public D
27
{
28
E (const C *x) : D(x) {}
29
virtual A foo () const = 0;
30
virtual A bar () const = 0;
31
};
32
33
struct F : public B
34
{
35
inline void baz ();
36
F (const E *);
37
const E *f;
38
};
39
40
inline void
41
F::baz ()
42
{
43
if (b == 0)
44
a = f->bar ();
45
else
46
a = f->foo ();
47
}
48
49
F::F (const E *) : B(4)
50
{
51
baz ();
52
}