This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/6180: Infinite loop in cc1 during dbr pass
- From: law at redhat dot com
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 04 Jun 2002 13:26:44 -0600
- Subject: Re: middle-end/6180: Infinite loop in cc1 during dbr pass
- Reply-to: law at redhat dot com
In message <200204051935.g35JZdxl014766@hiauly1.hia.nrc.ca>, "John David Anglin
" writes:
> > Infinite loop occurs compiling nm.c (binutils 2.12.90
> > 20020404). The final loop in dbr_sequence loops forever
> > because of a loop in the insn chain that occurs compiling
> > the function filter_symbols. The insn chain appears ok
> > when dbr_sequence is called.
>
> This is what is causing the problem. There is a millicode call
> insn in the function "return" just before the epilogue begin note.
> dbr_schedule puts the first insn in the epilogue into the delay
> slot of the call. This insn restores %r2 from the stack. It's
> probably ok to put it into the delay slot of the millicode call
> since it doesn't use %r2, but the start of the epilogue is now
> in an indeterminate position. reposition_prologue_and_epilogue_notes
> moves the epilogue begin note before the sequence. However, in
> fixing the insn chain, it apparently doesn't check for a sequence
> and the chain is left in a corrupt state. In particular, it doesn't
> touch the numbering inside the sequence.
>
> I probably can fix this by adding a blockage at the beginning
> of the epilogue. However, this seems like overkill and simply
> avoids the problem.
>
> Suggestions?
I think reposition_prologue_and_epilogue_notes really needs to understand
SEQUENCEs and deal with them properly.
jeff