aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-06-13 10:02:43 -0400
committerPatrick Palka <ppalka@redhat.com>2024-06-13 10:02:43 -0400
commit7fed7e9bbc57d502e141e079a6be2706bdbd4560 (patch)
tree1c03cb686da9638c575b2fc0b9721c06a1d813a8 /gcc/cp/parser.cc
parent3f3eb16743a126ebe6d200ad0091495b6f11962a (diff)
downloadgcc-7fed7e9bbc57d502e141e079a6be2706bdbd4560.zip
gcc-7fed7e9bbc57d502e141e079a6be2706bdbd4560.tar.gz
gcc-7fed7e9bbc57d502e141e079a6be2706bdbd4560.tar.bz2
c++: ICE w/ ambig and non-strictly-viable cands [PR115239]
Here during overload resolution we have two strictly viable ambiguous candidates #1 and #2, and two non-strictly viable candidates #3 and #4 which we hold on to ever since r14-6522. These latter candidates have an empty second arg conversion since the first arg conversion was deemed bad, and this trips up joust when called on #3 and #4 which assumes all arg conversions are there. We can fix this by making joust robust to empty arg conversions, but in this situation we shouldn't need to compare #3 and #4 at all given that we have a strictly viable candidate. To that end, this patch makes tourney shortcut considering non-strictly viable candidates upon encountering ambiguity between two strictly viable candidates (taking advantage of the fact that the candidates list is sorted according to viability via splice_viable). PR c++/115239 gcc/cp/ChangeLog: * call.cc (tourney): Don't consider a non-strictly viable candidate as the champ if there was ambiguity between two strictly viable candidates. gcc/testsuite/ChangeLog: * g++.dg/overload/error7.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions