https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87185
--- Comment #7 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:44e31eb265ba1984638908466a88095744a88709 commit r16-149-g44e31eb265ba1984638908466a88095744a88709 Author: Jason Merrill <ja...@redhat.com> Date: Mon Apr 14 12:18:06 2025 -0400 c++: pruning non-captures in noexcept lambda [PR119764] The patch for PR87185 fixed the ICE without fixing the underlying problem, that we were failing to find the declaration of the capture proxy that we are trying to decide whether to prune. Fixed by looking at the right index in stmt_list_stack. Since this changes captures, it changes the ABI of noexcept lambdas; we haven't worked hard to maintain lambda capture ABI, but it's easy enough to control here. PR c++/119764 PR c++/87185 gcc/cp/ChangeLog: * lambda.cc (insert_capture_proxy): Handle noexcept lambda. (prune_lambda_captures): Likewise, in ABI v21. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-noexcept1.C: New test.