https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114992
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:41db4716a5603052df626a1ab911b0b3fab322b2

commit r13-9442-g41db4716a5603052df626a1ab911b0b3fab322b2
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Mar 20 12:57:15 2025 -0400

    ipa: target clone and mangling alias [PR114992]

    Since the mangling of the second lambda changed (previously we counted all
    lambdas, now we only count lambdas with the same signature), we
    generate_mangling_alias for handler<lambda2> for backward compatibility.
    Since handler is COMDAT, resolve_alias puts the alias in the same comdat
    group as handler itself.  Then create_dispatcher_calls tries to add the
    alias to the same comdat group as the dispatcher, but it's already in a
    same_comdat_group, so we ICE.

    It seems like we're just missing a remove_from_same_comdat_group before
    add_to_same_comdat_group.

            PR c++/114992

    gcc/ChangeLog:

            * multiple_target.cc (create_dispatcher_calls):
            remove_from_same_comdat_group before add_to_same_comdat_group.

    gcc/testsuite/ChangeLog:

            * g++.target/i386/mangling-alias1.C: New test.

    (cherry picked from commit ab716829da7c885b97ac2649c7c0ff5c7703ffa5)

Reply via email to