summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error7.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error7.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error7.C b/gcc/testsuite/g++.dg/other/error7.C
new file mode 100644
index 000000000..9845b4172
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error7.C
@@ -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 class-name" }
+}