1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
3 
4 #include <cstdlib>
5 #include <exception>
6 
myterm()7 void myterm() {
8   exit (0);
9 }
10 
main()11 int main() {
12   try {
13     throw "";
14   } catch (...) {
15   }
16   try {
17     std::set_terminate (myterm);
18     throw;
19   } catch (...) {
20     return 1;
21   }
22   return 1;
23 }
24