Home | History | Annotate | Download | only in jni
      1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
      2 // { dg-options "-fexceptions" }
      3 
      4 int count;
      5 
      6 class Foo {
      7 public:
      8   Foo() { ++count; }
      9   Foo(const Foo&) { ++count; }
     10   ~Foo() { --count; }
     11 };
     12 
     13 
     14 int main() {
     15   try {
     16     throw Foo();
     17   }
     18   catch (Foo& object) {
     19     if (count == 1)
     20       return 0;
     21   }
     22   return 1;
     23 }
     24