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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:854c9b682562b103f60e5f0a823f31df17a97568

commit r13-8225-g854c9b682562b103f60e5f0a823f31df17a97568
Author: Patrick Palka <ppa...@redhat.com>
Date:   Mon Jan 15 16:53:28 2024 -0500

    c++: explicit inst w/ similar constrained partial specs [PR104634]

    Here we neglect to emit the definitions of A<double>::f2 and A<double*>::f4
    despite the explicit instantiations ultimately because TREE_PUBLIC isn't
    set on the corresponding partial specializations, whose declarations are
    created from maybe_new_partial_specialization which is responsible for
    disambiguating them from the first and third partial specializations (which
    have the same class-head but different constraints).  This makes grokfndecl
    in turn clear TREE_PUBLIC for f2 and f4 as if they have internal linkage.

    This patch fixes this by setting TREE_PUBLIC appropriately for such partial
    specializations.

            PR c++/104634

    gcc/cp/ChangeLog:

            * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC
            to the newly created partial specialization.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-explicit-inst6.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit 47673571b28278d857371167f4b67a04a1b87b59)

Reply via email to