https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105760
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:0003e469d4664397b65080a66ad7d6557bd7ffce commit r15-495-g0003e469d4664397b65080a66ad7d6557bd7ffce Author: Simon Martin <simon-l.mar...@laposte.net> Date: Mon May 6 15:20:10 2024 +0200 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.