This is the mail archive of the
mailing list for the GCC project.
Re: Bug in simplify_subreg?
Richard Henderson <email@example.com> writes:
> On Fri, Aug 02, 2002 at 01:02:26PM +0200, Lars Brinkhoff wrote:
> > If I insert the same checks against final_regno as are made to
> > REGNO (op), everything seems to be fine. Is this the right thing
> > to do?
> No. If the frame pointer isn't being used, then gen_reg_RTX isn't
> supposed to return frame_pointer_rtx.
But it does. Since outermode==SImode==Pmode and reload_in_progress==0,
gen_reg_RTX returns frame_pointer_rtx to simplify_subreg. And so
ORIGINAL_REGNO of frame_pointer_rtx is clobbered.
Would the right solution be to check frame_pointer_needed in gen_reg_RTX?
Lars Brinkhoff http://lars.nocrew.org/ Linux, GCC, PDP-10,
Brinkhoff Consulting http://www.brinkhoff.se/ HTTP programming