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

--- Comment #1 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:f4a3ae1ef5ec951f007c4bd530f30e44945c5f0d

commit r15-9216-gf4a3ae1ef5ec951f007c4bd530f30e44945c5f0d
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Fri Apr 4 19:08:40 2025 +1100

    c++/modules: Propagate bits to DECL_MAYBE_DELETED dups [PR119462]

    In the linked PR, we're importing over a DECL_MAYBE_DELETED decl with a
    decl that has already been instantiated.  This patch ensures that the
    needed bits are propagated across and that DECL_MAYBE_DELETED is cleared
    from the existing decl, so that later synthesize_method doesn't crash
    due to a definition unexpectedly already existing.

            PR c++/119462

    gcc/cp/ChangeLog:

            * module.cc (trees_in::is_matching_decl): Propagate exception
            spec and constexpr to DECL_MAYBE_DELETED; clear if appropriate.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/noexcept-3_a.C: New test.
            * g++.dg/modules/noexcept-3_b.C: New test.
            * g++.dg/modules/noexcept-3_c.C: New test.

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

Reply via email to