new
authorJason Merrill <jason@gcc.gnu.org>
Fri, 5 Jun 1998 22:57:38 +0000 (18:57 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Jun 1998 22:57:38 +0000 (18:57 -0400)
From-SVN: r20257

gcc/testsuite/g++.old-deja/g++.other/dtor1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor1.C b/gcc/testsuite/g++.old-deja/g++.other/dtor1.C
new file mode 100644 (file)
index 0000000..3f9803c
--- /dev/null
@@ -0,0 +1,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();
+};