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

Re: EGCS-19990314, undefined local symbol with a __label__


On Mon, Mar 22, 1999 at 01:17:49PM +0000, Richard Earnshaw wrote:
> Er, wasn't it combine?  or is reload expected to recreate these?

Oh, right you are.  It is combine's fault.

Comments?


r~
	* combine.c (distribute_notes): Place REG_LABEL also where
	REG_EQUAL indicates.

Index: combine.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/combine.c,v
retrieving revision 1.60
diff -c -p -d -r1.60 combine.c
*** combine.c	1999/02/25 23:45:09	1.60
--- combine.c	1999/03/23 02:15:34
*************** distribute_notes (notes, from_insn, i3, 
*** 11507,11519 ****
  
  	case REG_INC:
  	case REG_NO_CONFLICT:
- 	case REG_LABEL:
  	  /* These notes say something about how a register is used.  They must
  	     be present on any use of the register in I2 or I3.  */
  	  if (reg_mentioned_p (XEXP (note, 0), PATTERN (i3)))
  	    place = i3;
  
  	  if (i2 && reg_mentioned_p (XEXP (note, 0), PATTERN (i2)))
  	    {
  	      if (place)
  		place2 = i2;
--- 11507,11542 ----
  
  	case REG_INC:
  	case REG_NO_CONFLICT:
  	  /* These notes say something about how a register is used.  They must
  	     be present on any use of the register in I2 or I3.  */
  	  if (reg_mentioned_p (XEXP (note, 0), PATTERN (i3)))
  	    place = i3;
  
  	  if (i2 && reg_mentioned_p (XEXP (note, 0), PATTERN (i2)))
+ 	    {
+ 	      if (place)
+ 		place2 = i2;
+ 	      else
+ 		place = i2;
+ 	    }
+ 	  break;
+ 
+ 	case REG_LABEL:
+ 	  /* This can show up in several ways -- either directly in the
+ 	     pattern, or hidden off in the constant pool with (or without?)
+ 	     a REG_EQUAL note.  */
+ 	  /* ??? Ignore the without-reg_equal-note problem for now.  */
+ 	  if (reg_mentioned_p (XEXP (note, 0), PATTERN (i3))
+ 	      || ((tem = find_reg_note (i3, REG_EQUAL, NULL_RTX))
+ 		  && GET_CODE (XEXP (tem, 0)) == LABEL_REF
+ 		  && XEXP (XEXP (tem, 0), 0) == XEXP (note, 0)))
+ 	    place = i3;
+ 
+ 	  if (i2
+ 	      && (reg_mentioned_p (XEXP (note, 0), PATTERN (i2))
+ 	          || ((tem = find_reg_note (i2, REG_EQUAL, NULL_RTX))
+ 		      && GET_CODE (XEXP (tem, 0)) == LABEL_REF
+ 		      && XEXP (XEXP (tem, 0), 0) == XEXP (note, 0))))
  	    {
  	      if (place)
  		place2 = i2;

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