1 // { dg-do run } 2 // Origin: Mark Mitchell <mark@codesourcery.com> 3 4 int i; 5 6 struct A 7 { AA8 A () { i++; } ~AA9 ~A () { i--; } 10 }; 11 12 struct B : public virtual A 13 { BB14 B () { throw 1; } 15 }; 16 17 struct D: public B, virtual public A 18 { 19 }; 20 f()21void f() 22 { 23 D d; 24 } 25 main()26int main () 27 { 28 try { 29 f(); 30 } catch (int) { 31 } 32 33 return i; 34 } 35 36