optimization/858: Internal compiler error in scan_rtx_reg, at regrename.c:334
Richard Henderson
rth@redhat.com
Tue Nov 21 19:26:00 GMT 2000
On Tue, Nov 21, 2000 at 08:04:34PM -0000, igor@txc.com wrote:
> bibli1.c: In function `minim00':
> bibli1.c:2742: Internal compiler error in scan_rtx_reg, at regrename.c:334
> Please submit a full bug report.
> See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
The alternative within sparc's movdf_insn_sp32 that we matched uses
an EXTRA_CONSTRAINT, from which we can derive no class information.
I suspect this usage of EXTRA_CONSTRAINT to be incorrect, or at least
sub-optimal, since c/859 appears to suffer from this as well. However,
I'm not certain how I'd rearrange things for this pattern either, so
I'll work around the regrename crash for now.
r~
* regrename.c (scan_rtx_reg): Terminate the chain rather than
abort on mark_read with NO_REGS.
Index: regrename.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/regrename.c,v
retrieving revision 1.16
diff -c -p -d -r1.16 regrename.c
*** regrename.c 2000/11/15 11:06:13 1.16
--- regrename.c 2000/11/22 02:37:50
*************** scan_rtx_reg (insn, loc, class, action,
*** 325,350 ****
if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno)
! p = &this->next_chain;
! else if (action == mark_read)
{
if (! exact_match)
abort ();
- if (class == NO_REGS)
- abort ();
! this = (struct du_chain *)
! obstack_alloc (&rename_obstack, sizeof (struct du_chain));
! this->next_use = *p;
! this->next_chain = (*p)->next_chain;
! this->loc = loc;
! this->insn = insn;
! this->class = class;
! this->need_caller_save_reg = 0;
! *p = this;
! return;
}
! else if (action != terminate_overlapping_read || ! exact_match)
{
struct du_chain *next = this->next_chain;
--- 325,360 ----
if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno)
! {
! p = &this->next_chain;
! continue;
! }
!
! if (action == mark_read)
{
if (! exact_match)
abort ();
! /* ??? Class NO_REGS can happen if the md file makes use of
! EXTRA_CONSTRAINTS to match registers. Which is arguably
! wrong, but there we are. Since we know not what this may
! be replaced with, terminate the chain. */
! if (class != NO_REGS)
! {
! this = (struct du_chain *)
! obstack_alloc (&rename_obstack, sizeof (struct du_chain));
! this->next_use = *p;
! this->next_chain = (*p)->next_chain;
! this->loc = loc;
! this->insn = insn;
! this->class = class;
! this->need_caller_save_reg = 0;
! *p = this;
! return;
! }
}
!
! if (action != terminate_overlapping_read || ! exact_match)
{
struct du_chain *next = this->next_chain;
More information about the Gcc-patches
mailing list