aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorSimon Martin <simon-l.martin@laposte.net>2024-05-06 15:20:10 +0200
committerJason Merrill <jason@redhat.com>2024-05-14 18:08:06 -0400
commit0003e469d4664397b65080a66ad7d6557bd7ffce (patch)
tree3f7464c83b18da12fab9e5901a67c41853d3abf2 /gcc/testsuite/g++.dg
parent1288283051435c6b23473448aa21fa9ca53fabac (diff)
downloadgcc-0003e469d4664397b65080a66ad7d6557bd7ffce.zip
gcc-0003e469d4664397b65080a66ad7d6557bd7ffce.tar.gz
gcc-0003e469d4664397b65080a66ad7d6557bd7ffce.tar.bz2
c++: ICE in build_deduction_guide for invalid template [PR105760]
We currently ICE upon the following invalid snippet because we fail to properly handle tsubst_arg_types returning error_mark_node in build_deduction_guide. == cut == template<class... Ts, class> struct A { A(Ts...); }; A a; == cut == This patch fixes this, and has been successfully tested on x86_64-pc-linux-gnu. PR c++/105760 gcc/cp/ChangeLog: * pt.cc (build_deduction_guide): Check for error_mark_node result from tsubst_arg_types. gcc/testsuite/ChangeLog: * g++.dg/parse/error66.C: New test.
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/parse/error66.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/error66.C b/gcc/testsuite/g++.dg/parse/error66.C
new file mode 100644
index 0000000..82f4b8b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error66.C
@@ -0,0 +1,6 @@
+// PR c++/105760
+// { dg-do compile { target c++17 } }
+
+template<class... Ts, class> // { dg-error "must be at the end of the template parameter list" }
+struct A { A(Ts...); };
+A a;