summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.eh/ptrmem1.C
blob: 299dc4a05cfb729a97d1810cd41e43c01a8c2f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do run  }
extern "C" void exit (int);
extern "C" void abort (void);
struct A { int i; };
int main ()
{
  try { throw &A::i; }
  catch (int A::*p)
    {
      if (p == &A::i)
	exit (0);
      else
	abort ();
    }
  abort ();
}