https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124984
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:33241ea95dd187308d2d36fdc0e333234213efe6 commit r16-8845-g33241ea95dd187308d2d36fdc0e333234213efe6 Author: Jeff Law <[email protected]> Date: Fri Apr 24 19:01:45 2026 -0600 [RISC-V][PR target/124984] Fix RTL checking abort in thead memory address classification As shown in the PR, we can trigger an RTL checking abort when classifying thead specific addressing modes. As far as I can tell, the code is supposed to be extracting constant value from the multiply operation, but instead is referencing the wrong object. The fix is trivial. I don't think this is anywhere near serious enough to try to get into the imminent gcc-16 release. So after pre-commit testing is done I'll push to the trunk, then backport in a week or so after the gcc-16 release has been made. This has been regression tested on riscv64-elf and riscv32-elf. While it will spin on the Pioneer overnight, which has the relevant thead extensions, they aren't enabled by default, so I don't really expect any meaningful improvements to coverage. PR target/124984 gcc/ * config/riscv/thead.cc (th_memidx_classify_address_index): Extract constant multiplicand value from the right object. gcc/testsuite * gcc.target/riscv/pr124984.c: New test. (cherry picked from commit 1917b5a41d1a38876bbb4a6a586103ca40544391)
