On 2/4/2026 8:16 PM, Alexandre Oliva wrote:
I'm a bit surprised I didn't notice this on riscv64-elf in my testing.
Hmm, could it be that these patterns I observed are specific to some of
the boards we use for testing, and don't apply to you? My testing that
caught this problem was targeting spike.
Possible, but between my tester and the RISC-V pre-commit CI tester I
think we've got coverage of the most common cases. The fact that there
are so many damn extensions means that real coverage is virtually
impossible.
BUt you're also clearly doing something different in your testing as I'm
now seeing this after your recent changes:
Tests that now fail, but worked before (15 tests):
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O0 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O1 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O2 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O2 -flto
-fno-use-linker-plugin -flto-partition=none (test for excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects (test for excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions
(test for excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -O3 -g (test for
excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr114139.c -Os (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O0 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O1 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O2 (test for excess
errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O2 -flto
-fno-use-linker-plugin -flto-partition=none (test for excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects (test for excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -O3 -g (test for
excess errors)
unix//-march=rv32gcv: gcc: gcc.target/riscv/pr118170.c -Os (test for excess
errors)
This may a quirk of the interactions between -mcpu and -march
(behavioral annoyance that drives me nuts). But that ship has sailed ;(
Jeff