summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error33.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error33.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error33.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error33.C b/gcc/testsuite/g++.dg/other/error33.C
new file mode 100644
index 000000000..48fca70d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error33.C
@@ -0,0 +1,11 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin: PR c++/42218
+// { dg-do compile }
+
+template<int> struct A
+{
+ template<int> struct B;
+};
+
+int i = A<0>::B<0>::X::Y; // { dg-error "'A<0>::B<0>::X' has not been declared" }
+