https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> --- lra-eliminations.c has { /* See if this is setting the replacement hard register for an elimination. If DEST is the hard frame pointer, we do nothing because we assume that all assignments to the frame pointer are for non-local gotos and are being done at a time when they are valid and do not disturb anything else. Some machines want to eliminate a fake argument pointer (or even a fake frame pointer) with either the real frame pointer or the stack pointer. Assignments to the hard frame pointer must not prevent this elimination. */ for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) if (ep->to_rtx == SET_DEST (x) && SET_DEST (x) != hard_frame_pointer_rtx) setup_can_eliminate (ep, false); } It explicitly allows elimination with the hard frame pointer even when it is used by non-local gotos.