[Bug c++/123601] [16 Regression] ICE in build_min_non_dep_op_overload, at cp/tree.cc:3850 since r16-2519
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 20 20:25:25 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123601
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:9fdccdaa54a176fc710972fa65caadee57b5f9c3
commit r16-6938-g9fdccdaa54a176fc710972fa65caadee57b5f9c3
Author: Patrick Palka <ppalka@redhat.com>
Date: Tue Jan 20 15:25:07 2026 -0500
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.
More information about the Gcc-bugs
mailing list