https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is most likely the fix: diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 7cd230c4602..4d26c8789ce 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -8470,7 +8470,8 @@ aarch64_layout_frame (void) /* ... and any callee saved register that dataflow says is live. */ for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++) if (df_regs_ever_live_p (regno) - && !fixed_regs[regno] + && (regno == R30_REGNUM + || !fixed_regs[regno]) && (regno == R30_REGNUM || !crtl->abi->clobbers_full_reg_p (regno))) frame.reg_offset[regno] = SLOT_REQUIRED;