2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / eh28.C
blob57cab1178a4ca79004f7c56ff2fb41bc3c987f4f
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 #include <typeinfo>
6 int fail = 1;
8 class X            { public: virtual void p() { } };
9 class Y : public X { public: virtual void p() { fail = 0; } };
11 main()
13   try          { Y y; throw y; }
14   catch (X& x) { x.p();  }
15   catch (...)  { }
16   return fail;