https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118939
--- Comment #16 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #13) > Possible kludge to work around the questionable mechanism: > > diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc > index 59b41e3d046..2d51874a05b 100644 > --- a/gcc/config/arm/arm.cc > +++ b/gcc/config/arm/arm.cc > @@ -30887,7 +30887,17 @@ arm_frame_pointer_required (void) > && arm_except_unwind_info (&global_options) == UI_TARGET > && cfun->can_throw_non_call_exceptions) > { > - HOST_WIDE_INT size = get_frame_size (); > + HOST_WIDE_INT size; > + > + /* ??? We need to return the same answer during IRA and LRA, > + the problem being that get_frame_size does not do so, so > + use the offsets computed by arm_compute_frame_layout to > + get back to the early IRA value. */ > + if (lra_in_progress) > + size = cfun->machine->stack_offsets.locals_base > + - cfun->machine->stack_offsets.soft_frame; > + else > + size = ROUND_UP_WORD (get_frame_size ()); > > /* That's irrelevant if there is no stack adjustment. */ > if (size <= 0) That can't be right. If the frame size has changed, then the frame needs to be laid out again and any earlier layout assumptions revisited.