This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS-19990314, undefined local symbol with a __label__
- To: richard dot earnshaw at arm dot com, egcs-patches at egcs dot cygnus dot com
- Subject: Re: EGCS-19990314, undefined local symbol with a __label__
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 22 Mar 1999 18:18:32 -0800
- Cc: Dave Gilbert <gilbertd at treblig dot org>, law at cygnus dot com, egcs-bugs at egcs dot cygnus dot com, philb at gnu dot org, rmk at arm dot uk dot linux dot org
- References: <19990322040536.A1502@cygnus.com> <199903221317.NAA03834@sun52.NIS.cambridge>
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;