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
/
initlist105.C
blob
3720a2da83c47b264a56e3d4260fcee1fa1007dc
1
// PR c++/86669
2
// { dg-do run { target c++11 } }
3
4
#include <initializer_list>
5
6
struct S { S (); };
7
struct T : public S {};
8
int cnt;
9
void foo (int) { cnt++; }
10
11
S::S ()
12
{
13
int e = 1, f = 2, g = 3, h = 4;
14
15
for (auto k : { e, f, g, h })
16
foo (k);
17
}
18
19
int
20
main ()
21
{
22
S s;
23
if (cnt != 4)
24
__builtin_abort ();
25
T t;
26
if (cnt != 8)
27
__builtin_abort ();
28
}