https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121523
--- Comment #4 from Robin Dapp <rdapp at gcc dot gnu.org> --- (In reply to Pengfei Li from comment #3) > Sorry for my late response. I just added myself to the CC list. > > I tried the cases by Edwin Lu and Anton but haven't reproduced the ICE on > AArch64. Since I don't have risc-v env, I'll need some time to try with > cross-build. > > It looks like Robin may already have identified the root cause > (https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693473.html). If his > proposed small fix works, it might be a good idea to post it as a patch. OK, I'll post this as a patch after some testing. I was just speculating you'd have any insight why we're seeing this on riscv but not on aarch64. I'd have expected aarch64 uses the same code path but probably length-control changes things slightly. Anyway the -1 value for bound doesn't make sense the way it's used any way, so I'll go ahead.