On 1/31/2026 1:24 AM, Alexandre Oliva wrote:
When linking the pr110812 units with lto after compiling them with a
riscv(32?) compiler that defaults to the medlow code model, the
compiler uses HI20 relocations that overflow with our linker scripts.
I suppose the test expects PC-relative relocations for symbol
resolution, as in the medany code model, so select that explicitly.
Regstrapped on x86_64-linux-gnu along with other patches in this batch;
also tested with targets riscv64-elf and riscv32-elf on the same host,
both trunk and gcc-15. Ok to install?
for gcc/testsuite/ChangeLog
* gcc.target/riscv/lto/pr110812_0.c: Set cmodel explicitly.
* gcc.target/riscv/lto/pr110812_1.c: Likewise.
OK.
jeff