https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120714
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <l...@gcc.gnu.org>: https://gcc.gnu.org/g:45a17e3081120f51f8e8b1d7cda73c7d89453e85 commit r16-1834-g45a17e3081120f51f8e8b1d7cda73c7d89453e85 Author: Alexey Merzlyakov <alexey.merzlya...@samsung.com> Date: Mon Jun 30 13:58:29 2025 -0600 [RISC-V] Correct CFA notes for stack-clash protection [PR120714] Fixes incorrect SP-addresses used in CFA notes for the stack probes unrelative to the frame's top. It applied to the RISC-V targets code generation when the stack-clash protection is enabled. PR target/120714 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_allocate_and_probe_stack_space): Fix SP-addresses in REG_CFA_DEF_CFA notes for stack-clash case. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr120714.c: New test.