https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114665
--- Comment #3 from Patrick O'Neill <patrick at rivosinc dot com> --- Created attachment 57922 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57922&action=edit Generated assembly files Hmm doesn't look like it from my side - maybe there's some stack related weirdness going on here. Using r14-9877-g1f719aa7c0d > cat red.c signed char b; _Bool c[15][15]; int main() { for (long f = 0; f < 5; ++f) for (long g = 0; g < 5; ++g) c[f][g] = 1; _Bool(*h)[15] = c; for (int f = 0; f < 15; f += 1) for (int g = 0; g < 15; g += 1) b -= c[g][g] ? c[g][g] : h[f][g]; __builtin_printf("%X\n", b); } > /scratch/tc-testing/tc-apr-9/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc > -march=rv64gcv -O3 red.c -o red.out > /scratch/tc-testing/tc-apr-9/build-rv64gcv/bin/qemu-riscv64 red.out 35 > /scratch/tc-testing/tc-apr-9/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc > -march=rv64gcv -O2 red.c -o red.out > /scratch/tc-testing/tc-apr-9/build-rv64gcv/bin/qemu-riscv64 red.out FFFFFFB5