https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107542
Bug ID: 107542
Summary: ICE in spaceship_comp_cat, at cp/method.cc:1055
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: danakj at orodu dot net
Target Milestone: ---
Repro: https://godbolt.org/z/KPfsn8hPf
Reproduces in 12.2 and trunk on Godbolt.org.
Output:
<source>: In substitution of 'template<class T, class U> requires Ord<const
T*, const U*> constexpr auto operator<=>(const S<T>&, const S<U>&) [with T =
int; U = char]':
<source>:6:11: required from here
<source>:6:11: internal compiler error: in spaceship_comp_cat, at
cp/method.cc:1055
6 | { lhs <=> rhs } -> std::same_as<std::strong_ordering>;
| ~~~~^~~~~~~
0x2393c6e internal_error(char const*, ...)
???:0
0xaa9b58 fancy_abort(char const*, int, char const*)
???:0
0xd4a507 cp_build_binary_op(op_location_t const&, tree_code, tree_node*,
tree_node*, int)
???:0
0xadb22c build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
???:0
0xd3b412 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
???:0
0xb25576 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
???:0
0xb27052 constraints_satisfied_p(tree_node*, tree_node*)
???:0
0xcdd84a fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
???:0
0xadaefe build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
???:0
0xd3b412 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
???:0
0xb25576 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
???:0
0xb2715f evaluate_concept_check(tree_node*)
???:0
0xb18962 maybe_constant_value(tree_node*, tree_node*, bool)
???:0
0xcfdb3f finish_unary_op_expr(unsigned int, tree_code, cp_expr, int)
???:0
0xc872a7 c_parse_file()
???:0
0xdd0579 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.