[Bug c++/101043] ICE in check_noexcept_r for lambda conditional noexcept via requires expression
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 15 17:18:07 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101043
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:40a7707a7ea3568cee2cd80cd7e83b7eda678410
commit r14-5504-g40a7707a7ea3568cee2cd80cd7e83b7eda678410
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Nov 15 12:17:55 2023 -0500
c++: partially inst requires-expr in noexcept-spec [PR101043]
Here we're ICEing from strip_typedefs for the partially instantiated
requires-expression when walking its REQUIRES_EXPR_EXTRA_ARGS which
in this case is a TREE_LIST with non-empty TREE_PURPOSE (to hold the
captured local specialization 't' as per build_extra_args) which
strip_typedefs doesn't expect.
We can probably skip walking REQUIRES_EXPR_EXTRA_ARGS at all since it
shouldn't contain any typedefs in the first place, but it seems safer
and more generally useful to just teach strip_typedefs to handle non-empty
TREE_PURPOSE the obvious way. (The code asserts TREE_PURPOSE was empty
even since since its inception i.e. r189298.)
PR c++/101043
gcc/cp/ChangeLog:
* tree.cc (strip_typedefs_expr) <case TREE_LIST>: Handle
non-empty TREE_PURPOSE.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-requires37.C: New test.
More information about the Gcc-bugs
mailing list