enable-checking failure record_insns () and PARALLEL

grahams grahams@rcp.co.uk
Wed Apr 12 12:21:00 GMT 2000


Hi

I sent the following to gcc-bugs but didn't get any comments.

grahams wrote: 
> 
> Hi
> 
> I'm getting a enable-checking failure using the current CVS on
> i686-linux bootstrapping with "-O3 -mcpu=pentiumpro -march=pentiumpro
>  -fomit-frame-pointer"
> 
> The bootstrap fails because record_insns () is being passed a rtx
> which is a PARALLEL which causes INSN_UID (insns) to abort.
> 
> Question. Should record_insns () handle the parallel or does this
> indicate a bug elsewhere?
> 
> Graham


Here's a patch for record_insns () so it handles a parallel correctly?

It passes bootstrap on i686-linux with/without enable-checking using
current CVS.

ChangeLog
	* function.c (record_insns): Handle a INSN which is a parallel.

----------------------------------------------------------------------
*** function.c.orig	Wed Apr 12 18:46:08 2000
--- function.c	Wed Apr 12 18:59:42 2000
*************** expand_function_end (filename, line, end
*** 6694,6700 ****
  }
  
  /* Extend a vector that records the INSN_UIDs of INSNS (either a
!    sequence or a single insn).  */
  
  static void
  record_insns (insns, vecp)
--- 6694,6700 ----
  }
  
  /* Extend a vector that records the INSN_UIDs of INSNS (either a
!    sequence, parallel or a single insn).  */
  
  static void
  record_insns (insns, vecp)
*************** record_insns (insns, vecp)
*** 6711,6716 ****
--- 6711,6728 ----
  	{
  	  VARRAY_INT (*vecp, i) = INSN_UID (XVECEXP (insns, 0, len));
  	  ++i;
+ 	}
+     }
+   else if (GET_CODE (insns) == PARALLEL)
+     {
+       int len = XVECLEN (insns, 0);
+       int i = VARRAY_SIZE (*vecp);
+ 
+       VARRAY_GROW (*vecp, i + len);
+       while (--len >= 0)
+ 	{
+ 	   VARRAY_INT (*vecp, i) = INSN_UID (XEXP (XVECEXP (insns, 0, len), 0));
+ 	   ++i;
  	}
      }
    else
---------------------------------------------------------------------------------


More information about the Gcc-patches mailing list