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 <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:3129a2ed6a764c0687efaca9eba53dcf12d1d8a0

commit r15-2361-g3129a2ed6a764c0687efaca9eba53dcf12d1d8a0
Author: Jason Merrill <ja...@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.

Reply via email to