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]

Fix ICE in m68k_delegitimize_address


The operand of the RELOC{16,32} UNSPEC can also contain a LABEL_REF.

Andreas.

2010-11-16  Andreas Schwab  <schwab@linux-m68k.org>

	* config/m68k/m68k.c (m68k_delegitimize_address): Also expect
	LABEL_REF in UNSPEC operand.

Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c	(revision 166814)
+++ gcc/config/m68k/m68k.c	(working copy)
@@ -4684,7 +4684,7 @@ m68k_delegitimize_address (rtx orig_x)
 	  && XINT (unspec, 1) != UNSPEC_RELOC32))
     return orig_x;
   x = XVECEXP (unspec, 0, 0);
-  gcc_assert (GET_CODE (x) == SYMBOL_REF);
+  gcc_assert (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF);
   if (unspec != XEXP (addr.offset, 0))
     x = gen_rtx_PLUS (Pmode, x, XEXP (XEXP (addr.offset, 0), 1));
   if (addr.index)

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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