aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-05-03 13:32:55 -0400
committerJason Merrill <jason@redhat.com>2023-05-03 15:24:52 -0400
commit7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd (patch)
tree4d4b2dcddf80327b364c5f9747e61ac3a6e50579 /gcc/gcov.cc
parent3b7eecca20bcb05e0220b3d012df012902a23534 (diff)
downloadgcc-7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd.zip
gcc-7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd.tar.gz
gcc-7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd.tar.bz2
c++: over-eager friend matching [PR109649]
A bug in the simplification I did around 91618; at this point X<int>::f has DECL_IMPLICIT_INSTANTIATION set, but we've already identified what template it corresponds to, so we don't want to call check_explicit_specialization. To distinguish this case we need to look at DECL_TI_TEMPLATE. grokfndecl has for a long time set it to the OVERLOAD in this case, while the new cases I added for 91618 were leaving DECL_TEMPLATE_INFO null; let's adjust them to match. PR c++/91618 PR c++/109649 gcc/cp/ChangeLog: * friend.cc (do_friend): Don't call check_explicit_specialization if DECL_TEMPLATE_INFO is already set. * decl2.cc (check_classfn): Set DECL_TEMPLATE_INFO. * name-lookup.cc (set_decl_namespace): Likewise. gcc/testsuite/ChangeLog: * g++.dg/template/friend77.C: New test.
Diffstat (limited to 'gcc/gcov.cc')
0 files changed, 0 insertions, 0 deletions