aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C b/gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C
new file mode 100644
index 000000000..f4cdaf9d9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/template/crash89.C
@@ -0,0 +1,10 @@
+// PR c++/34397
+
+template<typename T, int = T()[0]> struct A // { dg-error "subscripted" }
+{
+ typedef A<T> B;
+};
+
+A<int> a; // { dg-error "declaration" }
+
+// { dg-prune-output "template argument 2 is invalid" }