repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist106.C
blob
df0afac8088d4826a12ed14c716addb92cbcba6b
1
// PR c++/86669
2
// { dg-do run { target c++11 } }
3
4
#include <initializer_list>
5
6
struct A { };
7
struct S : virtual public A { S (); };
8
struct T : public S, virtual public A {};
9
int cnt;
10
void foo (int) { cnt++; }
11
12
S::S ()
13
{
14
int e = 1, f = 2, g = 3, h = 4;
15
16
for (auto k : { e, f, g, h })
17
foo (k);
18
}
19
20
int
21
main ()
22
{
23
S s;
24
if (cnt != 4)
25
__builtin_abort ();
26
T t;
27
if (cnt != 8)
28
__builtin_abort ();
29
}