aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh28.C
blob: 3f2d0a6d68beb9c841a69c91cc91df83236e59b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*

#include <typeinfo>

int fail = 1;

class X            { public: virtual void p() { } };
class Y : public X { public: virtual void p() { fail = 0; } };

main()
{
  try          { Y y; throw y; }
  catch (X& x) { x.p();  }
  catch (...)  { }
  return fail;
}