https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116204
Bug ID: 116204 Summary: RISC-V: rv32 miscompile at -O0 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: int a; int b; int *d = &a; int main() { g: if (d) a = 2984200456; else goto g; b = 0xADD10000L < a; __builtin_printf("%d\n", b); } Commands: > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc > -march=rv32id -mabi=ilp32d -static red.c -o test.out -fno-strict-aliasing > QEMU_CPU=rv32 > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/qemu-riscv32 test.out 1 > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc > -march=rv64id -mabi=lp64d -static red.c -o test.out -fno-strict-aliasing > QEMU_CPU=rv64 > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/qemu-riscv64 test.out 0 Found via fuzzer.