https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122652
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Robin Dapp <[email protected]>: https://gcc.gnu.org/g:014dd4b845d97aa5823971ea8b58cf1811662554 commit r15-10592-g014dd4b845d97aa5823971ea8b58cf1811662554 Author: Robin Dapp <[email protected]> Date: Wed Nov 12 10:17:47 2025 +0100 RISC-V: vsetvl: Add null check for fault-first loop [PR122652]. For a fault-first load we store the first instruction that read its VL result. The loop to do so uses next_nondebug_insn () which returns nullptr when we are at the end. Check for that before accessing the next insn. PR target/122652 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: Add nullptr check. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/pr122652.c: New test. (cherry picked from commit b2d0abfcd5a3a58e7967eb76bb3508e5ef20d9fa)
