Home | History | Annotate | Download | only in jni
      1 // { dg-do run  }
      2 // Origin: Mark Mitchell <mark (at) codesourcery.com>
      3 
      4 int i;
      5 
      6 struct A
      7 {
      8   ~A ();
      9 };
     10 
     11 A::~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 
     24 C::C () {
     25   throw 3;
     26 }
     27 
     28 int main ()
     29 {
     30   try {
     31     C c;
     32   } catch (...) {
     33   }
     34 
     35   if (i != 1)
     36     return 1;
     37 }
     38