summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash38.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash38.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash38.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash38.C b/gcc/testsuite/g++.old-deja/g++.pt/crash38.C
new file mode 100644
index 000000000..4fc658eb1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash38.C
@@ -0,0 +1,18 @@
+// { dg-do assemble }
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+template <class T>
+struct S {
+ typedef typename T::Y<T>::Z X; // { dg-error "non-template" "non-template" } No Y in A
+// { dg-message "note" "note" { target *-*-* } 6 }
+// { dg-error "does not declare" "not declare" { target *-*-* } 6 }
+ X x; // { dg-error "does not name a type" } No Y in A
+};
+
+struct A {
+ struct Y {
+ typedef A Z;
+ };
+};
+
+template struct S<A>;