summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash7.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash7.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash7.C b/gcc/testsuite/g++.dg/template/crash7.C
new file mode 100644
index 000000000..ae07d91e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash7.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+// PR c++/10108: ICE in tsubst_decl for error due to non-existence
+// nested type.
+
+template <typename> struct A
+{ // { not-dg-error "candidates" }
+ template <typename> A(typename A::X) {} // { dg-error "no type" }
+};
+
+A<void> a; // { not-dg-error "instantiated|no match" }
+// We currently don't give the "no match" error because we don't add the
+// invalid constructor template to TYPE_METHODS.