summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/dtor3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/dtor3.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/dtor3.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/dtor3.C b/gcc/testsuite/g++.dg/parse/dtor3.C
new file mode 100644
index 000000000..3041ae4a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/dtor3.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+// Contributed by Wolfgang Bangerth <bangerth at dealii dot org>
+// PR c++/12335: Make sure we don't ICE on the qualified-id form of a
+// destructor call.
+
+struct Y {
+ ~Y() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } }
+};
+
+struct X : Y {
+ ~X() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } }
+ void f() {
+ X::~X(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } }
+ Y::~Y(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } }
+ }
+};