summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash84.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash84.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash84.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash84.C b/gcc/testsuite/g++.dg/template/crash84.C
new file mode 100644
index 000000000..f622aaa5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash84.C
@@ -0,0 +1,19 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR c++/35405
+// { dg-do compile }
+
+template<typename T> struct a
+{
+ template <template <typename> class C, typename X, C<X>* =0>
+ struct b // { dg-error "class C' is not a template|is not a valid type" }
+ {
+ };
+};
+
+void
+foo ()
+{
+ a<int> v; // { dg-message "instantiated from here" }
+}
+
+