summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/invalid-op1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/invalid-op1.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/invalid-op1.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/invalid-op1.C b/gcc/testsuite/g++.dg/parse/invalid-op1.C
new file mode 100644
index 000000000..0b75d0791
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/invalid-op1.C
@@ -0,0 +1,14 @@
+// PR c++/10150
+// Origin: Tom Evans <te200@eng.cam.ac.uk>
+// { dg-do compile }
+
+template <int I> struct A
+{
+ template <int> struct B
+ {
+ enum { e = I * A<I-1>::B }; // { dg-error "dependent-name" "depname" }
+ // { dg-message "note" "note" { target *-*-* } 9 }
+ };
+};
+
+A<0>::B<0> a; // { dg-message "instantiated" }