]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: non-dep reversed <=> returning int [PR123601]
authorPatrick Palka <ppalka@redhat.com>
Tue, 20 Jan 2026 20:25:07 +0000 (15:25 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 20 Jan 2026 20:25:07 +0000 (15:25 -0500)
commit9fdccdaa54a176fc710972fa65caadee57b5f9c3
tree23f1a2c6ce63cb9d4ba564ae16537a2675742f74
parent4ac080e384cd30d37fac069d791b813100e6524a
c++: non-dep reversed <=> returning int [PR123601]

The code path for non-dependent operator expressions rewritten from a
<=> returning a non-class type (added in r16-3727-gf2fddc4b84a843) is
also reached for a reversed such <=> expression with the form
0 @ (y <=> x) where the @ is <=>, so we need to relax the relevant
assert accordingly.

PR c++/123601

gcc/cp/ChangeLog:

* tree.cc (build_min_non_dep_op_overload): Relax
COMPARISON_CLASS_P assert to accept SPACESHIP_EXPR too.

gcc/testsuite/ChangeLog:

* g++.dg/lookup/operator-9.C: New test.
gcc/cp/tree.cc
gcc/testsuite/g++.dg/lookup/operator-9.C [new file with mode: 0644]