This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix AVR ICE
- From: Tom de Vries <vries at codesourcery dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Georg-Johann Lay <avr at gjlay dot de>, Denis Chertykov <chertykov at gmail dot com>
- Date: Tue, 20 Sep 2011 19:09:21 +0200
- Subject: [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;
}