From patchwork Tue Sep 20 17:09:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix AVR ICE From: Tom de Vries X-Patchwork-Id: 115607 Message-Id: <4E78C8C1.6090603@codesourcery.com> To: Bernd Schmidt Cc: "gcc-patches@gcc.gnu.org" , Georg-Johann Lay , Denis Chertykov Date: Tue, 20 Sep 2011 19:09:21 +0200 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 * 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; }