1 // PR c++/41449 2 // { dg-do run } 3 4 struct A 5 { AA6 A() {} AA7 A(const A&) { throw 1; } 8 }; 9 10 int bs; 11 struct B 12 { BB13 B() { ++bs; } BB14 B(const B&) { ++bs; } ~BB15 ~B() { --bs; } 16 }; 17 18 struct C 19 { 20 B b1; 21 A a; 22 B b2; 23 }; 24 main()25int main() 26 { 27 { 28 B b1, b2; 29 A a; 30 31 try { 32 C c = { b1, a, b2 }; 33 } catch (...) {} 34 } 35 if (bs != 0) 36 __builtin_abort (); 37 } 38