Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.mike / eh50.C
blobde21dc2f4027c5ee8c165be333efb43202ec068f
1 // { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 #include <exception>
6 void my_unexpected() {
7   throw 42;
10 template <class T> void foo(T) throw (int) { throw "Hi"; }
12 main() {
13   std::set_unexpected (my_unexpected);
14   try {
15     foo(1);
16   } catch (int i) {
17     if (i == 42)
18       return 0;
19   }
20   return 1;