[Bug c++/95735] ICE on invalid non-type template argument
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 15:51:32 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95735
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:5421fae8b17c7401f3a4ac5b9f414a47f7bda379
commit r11-1516-g5421fae8b17c7401f3a4ac5b9f414a47f7bda379
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jun 18 09:38:42 2020 -0400
c++: ICE in requires-expressions with invalid args [PR95735]
This ICE-on-invalid goes back to GCC 6. In finish_template_variable,
if coerce_innermost_template_parms returns error_mark_node, we pass
it down to constraints_satisfied_p and that error_mark_node flows
down to various satisfy_* functions and then to various tsubst_*
functions, where we crash. diagnose_constraints also doesn't cope
with error arglist, so I think we should just return as in the
patch below.
gcc/cp/ChangeLog:
PR c++/95735
* pt.c (finish_template_variable): Return if
coerce_innermost_template_parms return error_mark_node.
gcc/testsuite/ChangeLog:
PR c++/95735
* g++.dg/cpp2a/concepts-err2.C: New test.
More information about the Gcc-bugs
mailing list