re PR c++/8046 (ICE on illegal code involving destructor being treated as bit-not...
authorGiovanni Bajo <giovannibajo@libero.it>
Tue, 1 Jul 2003 15:39:04 +0000 (17:39 +0200)
committerWolfgang Bangerth <bangerth@gcc.gnu.org>
Tue, 1 Jul 2003 15:39:04 +0000 (09:39 -0600)
2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>

        PR c++/8046
        * g++.dg/other/error7.C: New test.

From-SVN: r68776

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

index 271f461..95e4e01 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
+
+        PR c++/8046
+        * g++.dg/other/error7.C: New test.
+
 2003-07-01  Kazu Hirata  <kazu@cs.umass.edu>
 
        * g++.old-deja/g++.abi/vbase1.C: Fix comment typos.
diff --git a/gcc/testsuite/g++.dg/other/error7.C b/gcc/testsuite/g++.dg/other/error7.C
new file mode 100644 (file)
index 0000000..eadb7b5
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// Origin: <andrewp at andypo dot net>
+// c++/8046: ICE on illegal code involving destructor being treated as bit-not
+//  expression
+
+class A;
+namespace N {}
+
+void foo(void)
+{
+  N::~A();    // { dg-error "not a member" }
+}