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; foo(int)9void foo (int) { cnt++; } 10 S()11S::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 main()20main () 21 { 22 S s; 23 if (cnt != 4) 24 __builtin_abort (); 25 T t; 26 if (cnt != 8) 27 __builtin_abort (); 28 } 29