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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:80bd9eb48190f3554c4de74ccb3d0976831160b1

commit r15-7204-g80bd9eb48190f3554c4de74ccb3d0976831160b1
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Sun Jan 5 23:01:44 2025 +1100

    c++/modules: Treat unattached lambdas as TU-local [PR116568]

    This fixes ICEs where unattached lambdas at class scope (for instance,
    in member template instantiations) are streamed.  This is only possible
    in header units, as in named modules attempting to stream such lambdas
    will be an error.

            PR c++/116568

    gcc/cp/ChangeLog:

            * module.cc (trees_out::get_merge_kind): Treat all lambdas
            without a mangling scope as un-mergeable.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/lambda-8.h: New test.
            * g++.dg/modules/lambda-8_a.H: New test.
            * g++.dg/modules/lambda-8_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
    Reviewed-by: Jason Merrill <ja...@redhat.com>

Reply via email to