This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ICE building Linux 2.4.20 sched.c on x86


Dara Hazeghi wrote:
we've just now had our third submission of this particular bug to bugzilla (10890 is the original, 11007 and 11053 are the duplicate).

This is my fault. This was introduced by a patch of mine here:
http://gcc.gnu.org/ml/gcc/2002-10/msg00284.html
This adds some consistency checking code to reload so it would abort instead of silently generating bad code. However, in this case, the code is OK. We have two reloads with the same inputs that aren't combined, so they don't conflict with each other.


The following patch seems to solve the problem. I verify that it works for the original testcase that prompted the original patch. I haven't done a bootstrap test yet.

Jim
2003-06-06  James E Wilson  <wilson@tuliptree.org>

	* reload1.c (merge_assigned_reloads): Abort only if two reloads have
	different in fields.

Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.394
diff -p -r1.394 reload1.c
*** reload1.c	11 May 2003 02:15:24 -0000	1.394
--- reload1.c	6 Jun 2003 07:01:14 -0000
*************** merge_assigned_reloads (insn)
*** 6138,6150 ****
  		       ? RELOAD_FOR_OTHER_ADDRESS : RELOAD_OTHER);
  
  		  /* Check to see if we accidentally converted two reloads
! 		     that use the same reload register to the same type.
! 		     If so, the resulting code won't work, so abort.  */
  		  if (rld[j].reg_rtx)
  		    for (k = 0; k < j; k++)
  		      if (rld[k].in != 0 && rld[k].reg_rtx != 0
  			  && rld[k].when_needed == rld[j].when_needed
! 			  && rtx_equal_p (rld[k].reg_rtx, rld[j].reg_rtx))
  			abort ();
  		}
  	}
--- 6138,6152 ----
  		       ? RELOAD_FOR_OTHER_ADDRESS : RELOAD_OTHER);
  
  		  /* Check to see if we accidentally converted two reloads
! 		     that use the same reload register with different inputs
! 		     to the same type.  If so, the resulting code won't work,
! 		     so abort.  */
  		  if (rld[j].reg_rtx)
  		    for (k = 0; k < j; k++)
  		      if (rld[k].in != 0 && rld[k].reg_rtx != 0
  			  && rld[k].when_needed == rld[j].when_needed
! 			  && rtx_equal_p (rld[k].reg_rtx, rld[j].reg_rtx)
! 			  && ! rtx_equal_p (rld[k].in, rld[j].in))
  			abort ();
  		}
  	}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]