From patchwork Tue Sep 20 17:09:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 115607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 83D46B70D1 for ; Wed, 21 Sep 2011 03:09:09 +1000 (EST) Received: (qmail 11686 invoked by alias); 20 Sep 2011 17:09:00 -0000 Received: (qmail 11675 invoked by uid 22791); 20 Sep 2011 17:08:56 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Sep 2011 17:08:38 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R63oD-0006sf-7H from Tom_deVries@mentor.com ; Tue, 20 Sep 2011 10:08:37 -0700 Received: from [127.0.0.1] ([172.16.63.104]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 20 Sep 2011 19:08:36 +0200 Message-ID: <4E78C8C1.6090603@codesourcery.com> Date: Tue, 20 Sep 2011 19:09:21 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 MIME-Version: 1.0 To: Bernd Schmidt CC: "gcc-patches@gcc.gnu.org" , Georg-Johann Lay , Denis Chertykov Subject: [PATCH] Fix AVR ICE Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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; }