Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.jason / dtor4.C
blob25ef1cfe7335c1da4806671399eb9e4e6be56fe2
1 // { dg-do assemble  }
2 // PRMS Id: 5420
3 // Bug: g++ gets mixed up calling destructors for references.
5 template<class X>
6 class Z {
7 public:
8     char space[100];
9     void kill()
10         { X& x = (X&) space[0];
11           x.~X(); }
14 class C { int i; };
16 void
17 f()
19     Z<int> r;
20     r.kill();
21     Z<C> s;
22     s.kill();