https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94162
Bug ID: 94162 Summary: ICE [neg] bad return type in defaulted <=> Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dacamara.cameron at gmail dot com Target Milestone: --- Whenever the return type of a defaulted <=> is not a comparison category gcc ICEs: #include <compare> struct S { int a; bool operator<=>(const S&) const = default; }; bool b = S{} < S{}; $ gcc -std=c++2a -c t.cpp t.cpp:5:8: internal compiler error: in genericize_spaceship, at cp/method.c:1050 5 | bool operator<=>(const S&) const = default; | ^~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions.