https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121779
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:f2fddc4b84a843d32399fe457acabb73fca9869b commit r16-3727-gf2fddc4b84a843d32399fe457acabb73fca9869b Author: Patrick Palka <ppa...@redhat.com> Date: Tue Sep 9 14:39:57 2025 -0400 c++: non-dep cmp op rewritten from <=> returning int [PR121779] Apparently an explicitly defined operator<=> isn't required to return std::foo_ordering, so build_min_non_dep_op_overload needs to be able to rebuild forms of (x <=> y) @ 0 where the @ resolved to a built-in and in turn isn't expressed as a function call. PR c++/121779 gcc/cp/ChangeLog: * tree.cc (build_min_non_dep_op_overload): Handle comparison operator expressions rewritten from a <=> that returns a non-class type. gcc/testsuite/ChangeLog: * g++.dg/lookup/operator-8.C: Remove outdated comment about this test failing. * g++.dg/lookup/operator-8a.C: New test. Reviewed-by: Jason Merrill <ja...@redhat.com>