Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.mike / eh38.C
blob5a5687982595eb45ba42597989dadf3d85248105
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 #include <typeinfo>
6 class B {
7 public:
8   int data;
9   B(int i) : data(i) {
10   }
11 } b(42);
13 main() {
14   try {
15     throw &b;
16   } catch (const B* bptr) {
17     if (bptr->data == 42)
18       {
19         try {
20           throw &b;
21         } catch (void *bptr) {
22           if (((B*)bptr)->data == 42)
23             return 0;
24         }
25       }
26   }
27   return 1;