Home | History | Annotate | Download | only in jni
      1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
      2 // { dg-options "-fexceptions" }
      3 
      4 void foo() {
      5   int i;
      6   i = 42;
      7   throw i;
      8 }
      9 
     10 void ee(int *);
     11 
     12 void bar() {
     13   int i = 2;
     14   ee(&i);
     15 }
     16 
     17 void ee(int *) { }
     18 
     19 int main() {
     20   try {
     21     foo();
     22     return 3;
     23   } catch (int& i) {
     24     bar();
     25     return i != 42;
     26   }
     27   return 2;
     28 }
     29