This is the mail archive of the gcc-patches@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]

[PATCH, committed] reload.c latent bug fix


	As with the earlier rtlanal.c latent bug, another case of nearly
identical code testing inner_regno, instead of regno, before accessing
hard_regno_nregs array using regno.

David

	* reload.c (refers_to_regno_for_reload_p): Test regno, not inner_regno,
	against FIRST_PSEUDO_REGISTER.

Index: reload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.234
diff -c -p -r1.234 reload.c
*** reload.c	2 Feb 2004 00:17:17 -0000	1.234
--- reload.c	4 Feb 2004 22:18:45 -0000
*************** refers_to_regno_for_reload_p (unsigned i
*** 6188,6194 ****
  	{
  	  unsigned int inner_regno = subreg_regno (x);
  	  unsigned int inner_endregno
! 	    = inner_regno + (inner_regno < FIRST_PSEUDO_REGISTER
  			     ? hard_regno_nregs[regno][GET_MODE (x)] : 1);
  
  	  return endregno > inner_regno && regno < inner_endregno;
--- 6188,6194 ----
  	{
  	  unsigned int inner_regno = subreg_regno (x);
  	  unsigned int inner_endregno
! 	    = inner_regno + (regno < FIRST_PSEUDO_REGISTER
  			     ? hard_regno_nregs[regno][GET_MODE (x)] : 1);
  
  	  return endregno > inner_regno && regno < inner_endregno;


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