2 // { dg-do compile { target c++11 } }
4 #include <initializer_list>
6 using IL = std::initializer_list<int>;
10 il = { 4,5,6 }; // { dg-warning "initializer_list" }
11 // the array is dead, il now points to garbage
12 il = *new IL{ 7, 8, 9 }; // { dg-warning "initializer_list" }
13 // the array is dead, il now points to garbage
14 return *il.begin(); // undefined