]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR rtl-optimization/122321][RISC-V] Bounds check another access to ira_reg_equiv...
authorJeff Law <jlaw@ventanamicro.com>
Sat, 1 Nov 2025 14:30:41 +0000 (08:30 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 1 Nov 2025 14:30:41 +0000 (08:30 -0600)
commitac3eeb987ad04923ddc57a9dc9bd4ec98146a981
tree53112635e4822b4fe0d37a95a8d996dbaf8a8d4c
parentacbcbeb91f93f400dcc0354713790daa84e5c707
[PR rtl-optimization/122321][RISC-V] Bounds check another access to ira_reg_equiv array

So another case where we're indexing into the ira_reg_equiv array without
checking bounds.  I sincerely hope we're not playing wack-a-mole here, but two
failures in a couple months for the same core problem is worrisome.

Bootstrapped and regression tested on x86_64 and riscv64 as well as run through
all the embedded targets in my tester without regressions.

PR rtl-optimization/122321
gcc/
* lra-constraints.cc (update_equiv): Make sure REGNO is in
ira_reg_equiv before trying to update ira_reg_equiv.

gcc/testsuite/
* gcc.target/riscv/rvv/autovec/pr122321.c: New test.
gcc/lra-constraints.cc
gcc/testsuite/gcc.target/riscv/rvv/autovec/pr122321.c [new file with mode: 0644]