https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90275
--- Comment #18 from David Binderman <dcb314 at hotmail dot com> ---
For this C code:
a() {
short *b;
short c;
long long *d = a;
for (;;) {
long long *e = a;
(*d *= *e - c) / *b ?: (*b = 0);
}
}
on this week's raspberry pi C cross compiler, with flag -O2, does this:
$ /home/dcb/raspberrypi/results/bin/arm-linux-gnueabihf-gcc -c -w -O2
testFile.97.c
during RTL pass: cse_local
testFile.97.c: In function ‘a’:
testFile.97.c:9:1: internal compiler error: in insert_regs, at cse.c:1128
9 | }
| ^
0x7e5b19 insert_regs
/home/dcb/gcc/trunk.git/gcc/cse.c:1128
0x17ab64b cse_insn
/home/dcb/gcc/trunk.git/gcc/cse.c:5956
0x17ade1d cse_extended_basic_block
/home/dcb/gcc/trunk.git/gcc/cse.c:6614
0x17ade1d cse_main
/home/dcb/gcc/trunk.git/gcc/cse.c:6793
This code works on x86, so something arm specific is happening.