Home | History | Annotate | Download | only in jni
      1 // { dg-do run  }
      2 // Test that an unhandled exception causes us to call terminate.
      3 
      4 #include <exception>
      5 #include <cstdlib>
      6 
      7 void my_terminate ()
      8 {
      9   std::exit (0);
     10 }
     11 
     12 int main (void)
     13 {
     14   std::set_terminate (my_terminate);
     15   throw 1;
     16   return 1;
     17 }
     18