https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118245
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>: https://gcc.gnu.org/g:9a16584beb312bfc493977e472dcb9d11ad5bc76 commit r14-11783-g9a16584beb312bfc493977e472dcb9d11ad5bc76 Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Wed May 14 20:49:22 2025 +1000 c++: Partially revert "Support lambdas attached to more places in modules" [PR118245] r14-9232-g3685fae23bb008 broke the ABI for lambdas in base classes, causing ICEs when different lambdas got given the same mangled name. This patch reverts the parser.cc changes from that patch to restore the old behaviour. The properly fixed behaviour is available in GCC 15.1 with r15-7202-g8990070b4297b9, but that change was not suitable for backporting. PR c++/118245 gcc/cp/ChangeLog: * parser.cc (cp_parser_class_head): Remove lambda scope when parsing base classes. gcc/testsuite/ChangeLog: * g++.dg/modules/lambda-7_a.H: Expect the test to fail. * g++.dg/modules/lambda-7_b.C: Likewise. * g++.dg/modules/lambda-7_c.C: Likewise. * g++.dg/cpp2a/lambda-uneval23.C: New test. Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>