https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118646
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Vineet Gupta <vine...@gcc.gnu.org>: https://gcc.gnu.org/g:019fe9c4d4c7cc9e325b5460d277ebaec108a838 commit r15-7239-g019fe9c4d4c7cc9e325b5460d277ebaec108a838 Author: Vineet Gupta <vine...@rivosinc.com> Date: Fri Jan 24 13:56:28 2025 -0800 RISC-V: Add another test for FRM elimination bug [PR118646] The issue is same as PR118103 and fixed by commit 55d288d4ff53 ("RISC-V: Make FRM as global register [PR118103]"). Essentially FRM save/restore were getting eliminated because FRM reg semantics were not being modelled correctly. In this case it showed up as SPEC2017 527.cam4 runtime aborts in glibc:round_away() due to non-canonical rounding mode showing up, "leaking" earlier in the call chain because such rounding mode save/restore was getting eliminated. PR target/118646 gcc/testsuite/ChangeLog: * gfortran.target/riscv/rvv/pr118646.f90 (New Test). Signed-off-by: Vineet Gupta <vine...@rivosinc.com>