https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115561

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:f30caf1bda8a0d086d0308e5024c2b4c43cbd6c0

commit r14-10516-gf30caf1bda8a0d086d0308e5024c2b4c43cbd6c0
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.

    (cherry picked from commit 3129a2ed6a764c0687efaca9eba53dcf12d1d8a0)
  • [Bug c++/115561] [14 Regression... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to