summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash30.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash30.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash30.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash30.C b/gcc/testsuite/g++.old-deja/g++.pt/crash30.C
new file mode 100644
index 000000000..dfbef1003
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash30.C
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+
+extern "C" int printf(const char *, ...);
+template <class T> struct A {
+ typedef typename T::X B; // { dg-error "" } not a class
+ A(double);
+};
+
+template <class T> void xxx(typename A<T>::B);
+
+template <class T> struct B {
+ friend void xxx<T>(T); // { dg-error "" } does not match any template
+};
+
+template struct B<double>;