aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-01-15 16:53:28 -0500
committerPatrick Palka <ppalka@redhat.com>2024-01-15 16:53:28 -0500
commit47673571b28278d857371167f4b67a04a1b87b59 (patch)
tree8355e8006981b89919113456bec570bbc94538af /gcc/cfgexpand.cc
parentd33c3b5ac9b9b3e314ae9118d483ade7e91a80a5 (diff)
downloadgcc-47673571b28278d857371167f4b67a04a1b87b59.zip
gcc-47673571b28278d857371167f4b67a04a1b87b59.tar.gz
gcc-47673571b28278d857371167f4b67a04a1b87b59.tar.bz2
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 <jason@redhat.com>
Diffstat (limited to 'gcc/cfgexpand.cc')
0 files changed, 0 insertions, 0 deletions