Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.jason / destruct.C
blobb0f2dfe107e6516dc152ad45cafddef67ee265f5
1 // { dg-do assemble  }
2 // Exhaustive test for destructors of simple types.
3 // PRMS Id: 2744, 3308
5 template <class T> class A {
6   T q;
7 public:
8   ~A() {
9     q.T::~T();
10     q.~T();
11     (&q)->T::~T();
12     (&q)->~T();
13   }
16 typedef char * cp;
17 typedef int I;
19 int main ()
21   A<int> a;
22   A<cp> b;
23   int i;
24   cp c;
26   i.~I();
27   i.I::~I();
28   (&i)->~I();
29   (&i)->I::~I();
30   c.~cp();
31   c.cp::~cp();
32   (&c)->~cp();
33   (&c)->cp::~cp();