re PR c++/8724 (explicit destructor call for incomplete class allowed)
authorMark Mitchell <mark@codesourcery.com>
Fri, 21 Feb 2003 18:08:14 +0000 (18:08 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 21 Feb 2003 18:08:14 +0000 (18:08 +0000)
PR c++/8724
* g++.dg/expr/dtor1.C: New test.

From-SVN: r63232

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/dtor1.C [new file with mode: 0644]

index 2b3fb96c970e003d2bef576d48ac8a2d327bc470..cd9fa1395f51c89335cdbfae810598288e597c1b 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-21  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8724
+       * g++.dg/expr/dtor1.C: New test.
+
 2003-02-21  Zack Weinberg  <zack@codesourcery.com>
 
        * gcc.dg/cpp/include3.c: New test.
diff --git a/gcc/testsuite/g++.dg/expr/dtor1.C b/gcc/testsuite/g++.dg/expr/dtor1.C
new file mode 100644 (file)
index 0000000..0d95049
--- /dev/null
@@ -0,0 +1,7 @@
+class Foo;
+
+void
+bar(void* p)
+{
+  static_cast<Foo*>(p)->~Foo(); // { dg-error "" }
+}