https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98845
Bug ID: 98845
Summary: [8/9/10 Regression] ICE: SSA corruption (Unable to
coalesce ssa_names 2 and 23 which are marked as MUST
COALESCE.)
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc-11.0.0-alpha20210124 snapshot (g:6b1633378b74bed1d999a0ae2549088515a30ba0)
ICEs when compiling the following testcase w/ -Os -fno-tree-dce:
int __attribute__ ((returns_twice))
func_58 (int);
int
func_215 (int func_215___trans_tmp_2, int g_180, int p_217, int p_218)
{
if (func_215___trans_tmp_2)
func_215 (0, 0, 0, 0);
else if (g_180)
{
if (p_218)
return 1;
p_218 = p_217;
}
else
{
p_217 = 0;
while (!p_217)
{
}
}
p_218 = 0;
while (p_218)
{
func_58 (p_217);
func_58 (p_217 + 1);
}
return 0;
}
% gcc-11.0.0 -Os -fno-tree-dce -c gdh96e2t.c
Unable to coalesce ssa_names 2 and 23 which are marked as MUST COALESCE.
p_217_2(ab) and p_217_23(D)(ab)
during RTL pass: expand
gdh96e2t.c: In function 'func_215':
gdh96e2t.c:5:1: internal compiler error: SSA corruption
5 | func_215 (int func_215___trans_tmp_2, int g_180, int p_217, int p_218)
| ^~~~~~~~
0xf1d345 fail_abnormal_edge_coalesce
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/tree-ssa-coalesce.c:1003
0xf1d345 coalesce_partitions
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/tree-ssa-coalesce.c:1425
0xf1d345 coalesce_ssa_name(_var_map*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/tree-ssa-coalesce.c:1755
0xeb8fcc remove_ssa_form
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/tree-outof-ssa.c:1065
0xeb8fcc rewrite_out_of_ssa(ssaexpand*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/tree-outof-ssa.c:1323
0x961e60 execute
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210124/work/gcc-11-20210124/gcc/cfgexpand.c:6533