aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/dtor1.C
blob: 3f9803c39a837864aa53b48bc9b289f4e7cab5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test for use of typedef in explicit destructor call.

#include <new>

struct X {
  typedef X foo;
};

X x;
unsigned char bar[sizeof (X)];

int
main ()
{
  X* p = new (bar) X;
  p->~foo();
};