1 // PR c++/94616 2 // { dg-do compile { target c++11 } } 3 4 struct Bar { BarBar5 Bar(int n) { if (n > 0) throw 2; } ~BarBar6 ~Bar() {} 7 }; 8 9 struct Foo { 10 Bar b1 = 0; 11 Bar b2 = 1; FooFoo12 Foo() {} ~FooFoo13 ~Foo() {} 14 }; 15 16 int main()17main() 18 { 19 try { 20 Foo f; 21 } catch(int) { 22 } 23 } 24