https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108423
Bug ID: 108423
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: [email protected]
Target Milestone: ---
Started between 20211114 and 20211121, at -O2+ :
$ cat z1.c
int f (int n, int (**(*a)(void))[n])
{
return (*a())[0];
}
int g ()
{
int m = 3;
int (*a[m])(void);
return f(m, &a);
}
$ gcc-13-20230115 -c z1.c -O2
z1.c: In function 'f':
z1.c:3:10: warning: returning 'int *' from a function with return type 'int'
makes integer from pointer without a cast [-Wint-conversion]
3 | return (*a())[0];
| ^
z1.c: In function 'g':
z1.c:9:15: warning: passing argument 2 of 'f' from incompatible pointer type
[-Wincompatible-pointer-types]
9 | return f(m, &a);
| ^~
| |
| int (* (*)[m])(void)
z1.c:1:24: note: expected 'int (** (*)(void))[n]' but argument is of type 'int
(* (*)[m])(void)'
1 | int f (int n, int (**(*a)(void))[n])
| ~~~~~~~~~^~~~~~~~~~~~
during GIMPLE pass: einline
z1.c:9:10: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.cc:360
9 | return f(m, &a);
| ^~~~~~~~
0x11b1edd make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int)
../../gcc/tree-ssanames.cc:357
0xfa16f6 make_ssa_name
../../gcc/tree-ssanames.h:97
0xfa16f6 remap_ssa_name
../../gcc/tree-inline.cc:237
0xfa5717 copy_tree_body_r(tree_node**, int*, void*)
../../gcc/tree-inline.cc:1226
0x1271d23 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:11289
0x1272784 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:11520
0xf9e851 remap_type_1
../../gcc/tree-inline.cc:596
0xf9fa28 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.cc:713
0xf9e6b7 remap_type_1
../../gcc/tree-inline.cc:425
0xf9fa28 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.cc:713
0xf9e6b7 remap_type_1
../../gcc/tree-inline.cc:425
0xf9fa28 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.cc:713
0xf9e7bf remap_type_1
../../gcc/tree-inline.cc:509
0xf9fa28 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.cc:713
0xf9e6b7 remap_type_1
../../gcc/tree-inline.cc:425
0xf9fa28 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.cc:713
0xfacb69 initialize_inlined_parameters
../../gcc/tree-inline.cc:3642
0xfacb69 expand_call_inline
../../gcc/tree-inline.cc:5004
0xfaf1e9 gimple_expand_calls_inline
../../gcc/tree-inline.cc:5307
0xfaf1e9 optimize_inline_calls(tree_node*)
../../gcc/tree-inline.cc:5479