[Bug c++/115561] [14/15 Regression] ICE checking constraints when a local class is involved since r14-9659
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 27 20:27:14 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115561
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:3129a2ed6a764c0687efaca9eba53dcf12d1d8a0
commit r15-2361-g3129a2ed6a764c0687efaca9eba53dcf12d1d8a0
Author: Jason Merrill <jason@redhat.com>
Date: Fri Jul 26 16:53:03 2024 -0400
c++: ICE with concept, local class, and lambda [PR115561]
Here when we want to synthesize methods for foo()::B
maybe_push_to_top_level
calls push_function_context, which sets cfun to a dummy value; later
finish_call_expr tries to set something in
cp_function_chain (i.e. cfun->language), which isn't set. Many places in
the compiler check cfun && cp_function_chain to avoid this problem; here we
also want to check !cp_unevaluated_operand, like set_flags_from_callee
does.
PR c++/115561
gcc/cp/ChangeLog:
* semantics.cc (finish_call_expr): Check cp_unevaluated_operand.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-lambda21.C: New test.
More information about the Gcc-bugs
mailing list