https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116238
Bug ID: 116238
Summary: [15 Regression] ICE building 526.blender_r on aarch64
SVE after 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: aarch64-sve, ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
I see 526.blender_r from SPEC2017 ICEing when building with -Ofast
-mcpu=neoverse-v2 -msve-vector-bits=128 -flto=auto.
Unfortunately the -flto is necessary to reproduce it.
I've reduced it to 3 small files that should be enough to reproduce it:
$ cat main.c
void a();
void main() { a(); }
$ cat foo.c
void a();
typedef struct {
char b, c;
} d;
typedef struct {
d bezt;
} e;
typedef struct {
int f;
} g;
e *h, *j;
void i(g *k, e **l) { *l = &h[k->f]; }
void BKE_mask_calc_handle_point_auto(g *k, e *l) {
float m, n = m / 2.0f;
char o = l->bezt.c, p = l->bezt.b;
i(k, &j);
d *q = &j->bezt;
if (q)
a();
l->bezt.b = p;
l->bezt.c = o;
a(n);
}
$ cat bar.c
void BKE_mask_calc_handle_point_auto();
int a() {
int b;
BKE_mask_calc_handle_point_auto(b);
}
Compile for aarch64 with:
gcc -Ofast -msve-vector-bits=128 -mcpu=neoverse-v2 main.c foo.c bar.c -flto
and the crash is:
during RTL pass: reload
bar.c: In function 'a.isra':
bar.c:5:1: internal compiler error: maximum number of generated reload insns
per insn achieved (90)
5 | }
| ^
0x1fe090b internal_error(char const*, ...)
$SRC/gcc/diagnostic-global-context.cc:491
0xbff0c3 lra_constraints(bool)
$SRC/gcc/lra-constraints.cc:5402
0xbe52ff lra(_IO_FILE*, int)
$SRC/gcc/lra.cc:2442
0xb9919b do_reload
$SRC/gcc/ira.cc:5973
0xb9919b execute
$SRC/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /home/ktkachov/builds/gcc-trunk/bin/gcc returned 1
exit status
compilation terminated.
/home/ktkachov/builds/binutils-trunk/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
I've bisected it to the commit g:3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b but I
don't know if that is the cause or uncovered a latent problem