https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108390
Bug ID: 108390 Summary: ICE in fold_convert_loc, at fold-const.cc:2504 partial ordering between array types Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template<class T, T t> long f(int(*)[t], T(*)[t]); template<class T, int i> int f(int(*)[i], T(*)[i]); int n = f<int, 2>(0, 0); <source>:4:18: internal compiler error: in fold_convert_loc, at fold-const.cc:2504 4 | int n = f<int, 2>(0, 0); | ~~~~~~~~~^~~~~~ 0x23975be internal_error(char const*, ...) ???:0 0xa693ae fancy_abort(char const*, int, char const*) ???:0 0xc99848 more_specialized_fn(tree_node*, tree_node*, int) ???:0 0xa97529 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ???:0 0xcb6fd4 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ???:0 0xc43be7 c_parse_file() ???:0 0xd7fd79 c_common_parse_file() ???:0 Godbolt says this is bad back to 8.1; before that it was ambiguous.