https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107557
Bug ID: 107557 Summary: [12/13 Regression] ICE in make_ssa_name_fn, at tree-ssanames.cc:360 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started between 20210822 and 20210905 at -O3|-Ofast, with file llvm-project-llvmorg-14.0.6/clang/test/CodeGen/vlt_to_pointer.c : $ cat z1.c int c[1][3*2]; int f(int * const m, int (**v)[*m * 2]) { return &(c[0][*m]) == &((*v)[0][*m]); } int test(int n, int (*(*fn)(void))[n]) { return (*fn())[0]; } int main() { int m = 3; int (*d)[3*2] = c; int (*fn[m])(void); return f(&m, &d) + test(m, &fn); } $ gcc-13-20221106 -c z1.c -m32 -Ofast -fnon-call-exceptions -ftrapv -fsanitize=undefined z1.c: In function 'main': z1.c:15:30: warning: passing argument 2 of 'test' from incompatible pointer type [-Wincompatible-pointer-types] 15 | return f(&m, &d) + test(m, &fn); | ^~~ | | | int (* (*)[(((m) <= 0 ? __builtin___ubsan_handle_vla_bound_not_positive(&*.Lubsan_data0, (unsigned int)(m)) : (void)0, (m))) - 1])(void) z1.c:6:25: note: expected 'int (* (*)(void))[(n) - 1]' but argument is of type 'int (* (*)[(((m) <= 0 ? __builtin___ubsan_handle_vla_bound_not_positive(&*.Lubsan_data0, (unsigned int)(m)) : (void)0, (m))) - 1])(void)' 6 | int test(int n, int (*(*fn)(void))[n]) | ~~~~~~~~^~~~~~~~~~~~~ during GIMPLE pass: einline z1.c:15:22: internal compiler error: in make_ssa_name_fn, at tree-ssanames.cc:360 15 | return f(&m, &d) + test(m, &fn); | ^~~~~~~~~~~~ 0xf0e385 make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int) ../../gcc/tree-ssanames.cc:357 0xd7104e make_ssa_name ../../gcc/tree-ssanames.h:97 0xd7104e remap_ssa_name ../../gcc/tree-inline.cc:237 0xd74257 copy_tree_body_r(tree_node**, int*, void*) ../../gcc/tree-inline.cc:1226 0xfa17b2 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) ../../gcc/tree.cc:11281 0xd70124 remap_type_1 ../../gcc/tree-inline.cc:596 0xd70498 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.cc:713 0xd7037e remap_type_1 ../../gcc/tree-inline.cc:532 0xd70498 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.cc:713 0xd70057 remap_type_1 ../../gcc/tree-inline.cc:425 0xd70498 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.cc:713 0xd700e6 remap_type_1 ../../gcc/tree-inline.cc:509 0xd70498 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.cc:713 0xd70057 remap_type_1 ../../gcc/tree-inline.cc:425 0xd70498 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.cc:713 0xd7918c initialize_inlined_parameters ../../gcc/tree-inline.cc:3659 0xd7918c expand_call_inline ../../gcc/tree-inline.cc:5020 0xd7af89 gimple_expand_calls_inline ../../gcc/tree-inline.cc:5323 0xd7af89 optimize_inline_calls(tree_node*) ../../gcc/tree-inline.cc:5495 0x190544e early_inliner(function*) ../../gcc/ipa-inline.cc:3038