https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99086
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |ice-on-invalid-code Known to work| |11.0 Known to fail| |10.2.1 Last reconfirmed| |2021-02-14 CC| |jason at gcc dot gnu.org --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to crillion from comment #0) > #include <iterator> > > class value_wrapper > { > public : > > bool operator<=>(const value_wrapper& rhs) const = default; This is a bug, the spaceship operator has to return one of std::strong_ordering, std::weak_ordering or std::partial_ordering. GCC's crash on the invalid code has already been fixed in r11-5866: c++: Fix defaulted <=> fallback to < and == [PR96299] I don't know if there are plans to backport that.