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] Fix AVR ICE


Hi Bernd,

this patch fixes an ICE in final.c:final() when building for AVR with
--enable-checking=yes,rtl.
The ICE happens when the jump label is a return, but expected to be a label.

Tested on X86_64 and AVR (courtesy of Johann).

ok for trunk?

Thanks,
- Tom

2011-09-20 Tom de Vries  <tom@codesourcery.com>

	* final.c (final): Handle if JUMP_LABEL is not LABEL_P.
Index: gcc/final.c
===================================================================
--- gcc/final.c (revision 178804)
+++ gcc/final.c (working copy)
@@ -1739,7 +1739,7 @@ final (rtx first, FILE *file, int optimi
       if (optimize_p && JUMP_P (insn))
 	{
 	  rtx lab = JUMP_LABEL (insn);
-	  if (lab && LABEL_NUSES (lab) == 1)
+	  if (lab && LABEL_P (lab) && LABEL_NUSES (lab) == 1)
 	    {
 	      LABEL_REFS (lab) = insn;
 	    }

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