https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125378
Bug ID: 125378
Summary: ICE with rewritten < from short-returning operator<=>
in template
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: s.kimura.h41104 at gmail dot com
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/K3esczvrc
Reproducer:
```
struct S {
short operator<=>(int);
};
template<class T>
void foo() {
S s;
(void)(s <= 0);
}
```
Backtrace:
<source>: In function 'void foo()':
<source>:8:15: internal compiler error: in build_min_non_dep_op_overload, at
cp/tree.cc:3858
8 | (void)(s <= 0);
| ^
0x29ddc68 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x29d28ab internal_error(char const*, ...)
???:0
0xb2f9a2 fancy_abort(char const*, int, char const*)
???:0
0xe695a0 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
???:0
0xd82673 c_parse_file()
???:0
0xf114e9 c_common_parse_file()
???:0