1 // { dg-do run } 2 // Origin: Mark Mitchell <mark@codesourcery.com> 3 4 int i; 5 6 struct A 7 { 8 ~A (); 9 }; 10 ~A()11A::~A () { 12 i = 1; 13 } 14 15 struct B : virtual public A { 16 }; 17 18 struct C { 19 C (); 20 21 B b; 22 }; 23 C()24C::C () { 25 throw 3; 26 } 27 main()28int main () 29 { 30 try { 31 C c; 32 } catch (...) { 33 } 34 35 if (i != 1) 36 return 1; 37 } 38