https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92847
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Tue Dec 10 20:12:50 2019 New Revision: 279185 URL: https://gcc.gnu.org/viewcvs?rev=279185&root=gcc&view=rev Log: PR c++/92847 - C++20 comparison ambiguity with class template. This testcase demonstrates that looking at cand->template_decl is not a good starting place for finding the most general template, as it is only set for primary templates. * call.c (cand_parms_match): Handle all templated functions. Added: trunk/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite5.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c