From patchwork Mon Feb 13 19:43:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 140966 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 047CD1007D1 for ; Tue, 14 Feb 2012 06:44:10 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329767051; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=FN4zBVsLWkRCKmGZIL1n de9SulU=; b=IYhcLn+Z2kNr+Edv02bXVcH3Bb7yFcsE1Q5NrBVO6JtFxHCUKByu T/pSxxHhGYD43tYHpQuTOH0A8fXsayd9AWySn6q7mp5srpaDMdo3CYrE1LQoVBxH PA4Pq6MWMOwoifZY/mM7jmp6diX1fHzSPuvTeU+Dj1Msrp4E9ceLS4g= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=qRG4Kimi5ZeUai2JO3N7p3N7j68dAorqgRjLfEEqD7TyPBiHlquS4gSOkwVc6u Sk6/B+eJ/UHz/Uj7DTy7Lhc/ipzprSHqhlKNjeimmACVxMAPpHORxnXNJMw0Wxw/ IN+d1vH/Ts7SKUIlX/J1GnojeNX+txBZrFslPIpMRSOF4=; Received: (qmail 7230 invoked by alias); 13 Feb 2012 19:44:08 -0000 Received: (qmail 7221 invoked by uid 22791); 13 Feb 2012 19:44:07 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 19:43:55 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1DJhtsC021024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Feb 2012 14:43:55 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1DJhsBI014206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Feb 2012 14:43:54 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id q1DJhr7E007940 for ; Mon, 13 Feb 2012 20:43:54 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id q1DJhrHe007939 for gcc-patches@gcc.gnu.org; Mon, 13 Feb 2012 20:43:53 +0100 Date: Mon, 13 Feb 2012 20:43:53 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix cselib dump ICE Message-ID: <20120213194353.GM18768@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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! While debugging PR52172, I've noticed ICE when dumping RTL, all of cselib seems to test setting_insn for NULL, but this spot doesn't. Ok for trunk? 2012-02-13 Jakub Jelinek * cselib.c (dump_cselib_val): Don't assume l->setting_insn is non-NULL. Jakub --- gcc/cselib.c.jj 2012-01-26 09:22:21.000000000 +0100 +++ gcc/cselib.c 2012-02-13 11:07:15.109023769 +0100 @@ -2688,8 +2688,11 @@ dump_cselib_val (void **x, void *info) fputs (" locs:", out); do { - fprintf (out, "\n from insn %i ", - INSN_UID (l->setting_insn)); + if (l->setting_insn) + fprintf (out, "\n from insn %i ", + INSN_UID (l->setting_insn)); + else + fprintf (out, "\n "); print_inline_rtx (out, l->loc, 4); } while ((l = l->next));