aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-modref.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-11-18 10:04:27 -0500
committerPatrick Palka <ppalka@redhat.com>2021-11-18 10:04:27 -0500
commit6fa8e0896c6ec96eddcedb2b92502a7bbb525c03 (patch)
treebd370afc0e0047b2239d602b60b98e0421757f83 /gcc/ipa-modref.c
parente3dbd2e14020d5a4f3401fa60dd5792b99fae108 (diff)
downloadgcc-6fa8e0896c6ec96eddcedb2b92502a7bbb525c03.zip
gcc-6fa8e0896c6ec96eddcedb2b92502a7bbb525c03.tar.gz
gcc-6fa8e0896c6ec96eddcedb2b92502a7bbb525c03.tar.bz2
c++: unqual lookup performed twice w/ template-id ADL [PR102670]
Here we're incorrectly performing unqualified lookup of 'adl' again at substitution time for the call adl<I>(t) (for which name lookup at parse time found nothing) which causes us to reject the testcase because the second unqualified lookup finds the later-declared variable template 'adl', leading to confusion. Fixed thusly. The testcase concepts-recursive-sat1.C needed to be adjusted to use ADL proper instead of relying on this incorrect second unqualified lookup. PR c++/102670 gcc/cp/ChangeLog: * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When looking for an identifier callee in the koenig_p case, also look through TEMPLATE_ID_EXPR. Use tsubst_copy to substitute through the template arguments of the template-id. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-recursive-sat1.C: Adjust to use ADL proper. * g++.dg/cpp2a/fn-template23.C: New test.
Diffstat (limited to 'gcc/ipa-modref.c')
0 files changed, 0 insertions, 0 deletions