https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101626
Bug ID: 101626
Summary: [12 Regression] ICE in verify_sra_access_forest, at
tree-sra.c:2376
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Changed between 20210502 and 20210509.
(gcc configured with --enable-checking=yes)
Affects a bunch of testsuite files at -O1+,
e.g. pr36373*.c, pr39120.c, pr50444.c :
$ cat pr39120.c
struct X { int *p; } x;
struct X __attribute__((noinline))
foo(int *p) { struct X x; x.p = p; return x; }
void __attribute((noinline))
bar() { *x.p = 1; }
extern void abort (void);
int main()
{
int i = 0;
x = foo(&i);
bar();
if (i != 1)
abort ();
return 0;
}
$ gcc-12-20210725 -c pr39120.c -O2 -fsso-struct=big-endian
during GIMPLE pass: esra
pr39120.c: In function 'foo':
pr39120.c:18:1: internal compiler error: in verify_sra_access_forest, at
tree-sra.c:2376
18 | }
| ^
0xee585c verify_sra_access_forest(access*)
../../gcc/tree-sra.c:2376
0xee5af1 verify_all_sra_access_forests()
../../gcc/tree-sra.c:2420
0xee9d45 analyze_all_variable_accesses
../../gcc/tree-sra.c:3480
0xeea7c6 perform_intra_sra
../../gcc/tree-sra.c:4564