[Bug c++/94162] New: ICE [neg] bad return type in defaulted <=>
dacamara.cameron at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 23:47:29 GMT 2020
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.
More information about the Gcc-bugs
mailing list