https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99792
Bug ID: 99792
Summary: MVE: Assemble failure with "branch out of range" at
-O3
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat test.c
short a[2][19][6][844];
char b[2][19][40];
long long c[2][722];
void d() {
for (int e; e < 2; ++e)
for (int f = 0; f < 19; ++f)
for (int g = 0; g < 6; ++g)
for (int h = 0; h < 11; ++h)
for (int i = 0; i < 3; ++i)
a[e][f][g][h + i] = 0;
for (int e = 0; e < 2; ++e)
for (int f = 0; f < 19; ++f)
for (int g = 0; g < 6; ++g)
for (int h = 0; h < 3; ++h)
b[e][f][g * 6 + h] = 3;
for (int e = 0; e < 2; ++e)
for (int f = 0; f < 9; ++f)
for (int g = 0; g < 26; ++g)
for (int h = 0; h < 13; ++h)
c[e][f * 9 + g + h] = 90719611319;
}
$ arm-eabi-gcc -c test.c -march=armv8.1-m.main+mve -mfloat-abi=hard -O3
-mtune=cortex-a72
/tmp/ccaAJzi3.s: Assembler messages:
/tmp/ccaAJzi3.s:104: Error: branch out of range
Obviously the choice of scheduling is questionable given the choice of -march,
but we shouldn't generate out-of-range branches in any case.