From patchwork Fri Jan 20 21:35:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 137118 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 8E246B6F65 for ; Sat, 21 Jan 2012 08:38:14 +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=1327700295; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:User-Agent:MIME-Version: Content-Type:Message-Id:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=Q3yf7u1o6VwNTRxvSy6Ia4p9S9E=; b=v1NkLND9p9tSC46 /BuoQkL1E8jGDZHeQdbh6zrl8aY4cz96UqmGaJIynoq/CM4JQZYYyd/qqMJhsvgK z8gzabrsyrkLL4kWnUpisTXFMLG3nB+tPaYR9Wxcwy7xchCXqsPWJFKEd+ah7cty DTRWYVqAw9kAfaCMQIngmGhOnlAc= 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:From:To:Subject:Date:User-Agent:MIME-Version:Content-Type:Message-Id:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Ygw/BpCX4P6SJ2GKmyZDckAszG7NrJS2tKD1jpiWitEzP9D5BC5jV3PTt/r1aD 4wv9EpCUvTpT8aIq6kmMy0JPJVPez989iHE4hphW9uxW6Ax1pCb1wH3KDlmU6Vxg iSn8xv25uXVgpDhkZCXJFO6Ds0DxPscLLP2LvpelK4VKk=; Received: (qmail 17761 invoked by alias); 20 Jan 2012 21:38:11 -0000 Received: (qmail 17750 invoked by uid 22791); 20 Jan 2012 21:38:10 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jan 2012 21:37:57 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D92F3CB3B9C for ; Fri, 20 Jan 2012 22:37:57 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rr-Tl3xIdK57 for ; Fri, 20 Jan 2012 22:37:57 +0100 (CET) Received: from [192.168.1.2] (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id A3824CB3B4C for ; Fri, 20 Jan 2012 22:37:57 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix crash of debug_bb_n on 0 and 1 in RTL mode Date: Fri, 20 Jan 2012 22:35:10 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201201202235.11170.ebotcazou@adacore.com> 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 Long overdue, and regression from when ENTRY_BLOCK and EXIT_BLOCK were handled differently so applied on mainline/4.6/4.5 branches after testing on x86-linux. 2012-01-20 Eric Botcazou * cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK. Index: cfgrtl.c =================================================================== --- cfgrtl.c (revision 183348) +++ cfgrtl.c (working copy) @@ -1674,9 +1674,10 @@ rtl_dump_bb (basic_block bb, FILE *outf, putc ('\n', outf); } - for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last; - insn = NEXT_INSN (insn)) - print_rtl_single (outf, insn); + if (bb->index != ENTRY_BLOCK && bb->index != EXIT_BLOCK) + for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last; + insn = NEXT_INSN (insn)) + print_rtl_single (outf, insn); if (df) {