https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105537
Bug ID: 105537
Summary: ICE: cannot update SSA form (error: statement uses
released SSA name)
Product: gcc
Version: 13.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 13.0.0 20220508 snapshot (g:a1947c92f7cda5f6cf7b8d8a9a44f6dd45352c03) ICEs
when compiling the following testcase w/ -O3 -ffast-math -fsignaling-nans
-fvar-tracking-assignments -fno-move-loop-stores:
int n;
double
ext1 (int);
void
ext2 (double);
int
sum (int v1, int v2)
{
return v1 + v2;
}
void
bar (void)
{
ext2 (ext1 (n));
}
__attribute__ ((optimize ("-O3"))) void
foo (int *x)
{
static int i;
bar ();
for (i = 0; i != 2; i = sum (i, 1))
n = *x = 0;
}
% gcc-13.0.0 -O3 -ffast-math -fsignaling-nans -fvar-tracking-assignments
-fno-move-loop-stores -w -c sqnqheby.c
sqnqheby.c: In function 'foo':
sqnqheby.c:22:1: error: statement uses released SSA name
22 | foo (int *x)
| ^~~
# DEBUG v1 => _1
The use of _1 should have been replaced
during GIMPLE pass: ldist
sqnqheby.c:22:1: internal compiler error: cannot update SSA form
0xf70cc6 update_ssa(unsigned int)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220508/work/gcc-13-20220508/gcc/tree-into-ssa.cc:3349
0x104f1c4 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int,
loop*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220508/work/gcc-13-20220508/gcc/tree-ssa-loop-manip.cc:642
0x104f1c4 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int,
loop*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220508/work/gcc-13-20220508/gcc/tree-ssa-loop-manip.cc:629
0xf7d869 loop_distribution::execute(function*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220508/work/gcc-13-20220508/gcc/tree-loop-distribution.cc:3865
0xf7e097 execute
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220508/work/gcc-13-20220508/gcc/tree-loop-distribution.cc:3912