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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Patrick Palka
<[email protected]>:

https://gcc.gnu.org/g:5f11a4625a875fd297e34b8d8587e2a8781d024d

commit r16-9633-g5f11a4625a875fd297e34b8d8587e2a8781d024d
Author: Patrick Palka <[email protected]>
Date:   Fri Sep 4 23:00:29 2026 -0400

    c++/modules: handle tinfo with identifier as template [PR127207]

    A couple of sanity checks need to be made robust to TEMPLATE_INFO that
    has IDENTIFIER_NODE as its TI_TEMPLATE, which is how we express the
    friend template specialization createFoo<T>() when there is no existing
    declaration of createFoo.

            PR c++/127207

    gcc/cp/ChangeLog:

            * module.cc (trees_out::decl_value): Relax checking assert
            to accept IDENTIFIER_NODE as TI_TEMPLATE.
            (get_originating_module_decl): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/friend-15_a.H: New test.
            * g++.dg/modules/friend-15_b.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>
    (cherry picked from commit dad0fca70f5a35b1016189eb544ea729b0144417)

Reply via email to