From patchwork Wed Aug 20 01:56:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 381529 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A495914010C for ; Wed, 20 Aug 2014 11:59:29 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; q=dns; s=default; b=HniLIqgEB5uQs5xR z56TBbRIEx3+E1aSS2zGnpEh8isrZSfHwVSk+K+jzcODbr/ZFD4Ia8mbgLAGmCM4 YBNEMIJFSWDF+GnC2Tsx0hTlhxQm79/FQgqV7VNRmmLmtkZnbbmlHNE+DPf/dy3B IXg0xjGhjDdVE8fsViVeIMHXovQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; s=default; bh=+H0s9nBvPRxbRaY72MugMu MiK9g=; b=jxsvwJ2Vv7BgHH1Y7+IpMMBlIAQ+/ME4UQjVAWVVjwBlTzqCAJTHlW pil1pLa1luJVZbpx7jfVK2/fY7Aq8dD0Z7dcQFAzW9cWlV3XSfJ9Tk76iIVs/JvH GXFGreIXnUwveEkzgL2rLeyH1DpHpfgA9iEayVITeXGr/uUHp+EHk= Received: (qmail 19945 invoked by alias); 20 Aug 2014 01:59:20 -0000 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 Received: (qmail 19519 invoked by uid 89); 20 Aug 2014 01:59:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Aug 2014 01:59:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7K1xGwc009786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Aug 2014 21:59:16 -0400 Received: from [10.3.225.110] (vpn-225-110.phx2.redhat.com [10.3.225.110]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7K1xFCN001410; Tue, 19 Aug 2014 21:59:16 -0400 Message-ID: <1408499766.2473.132.camel@surprise> Subject: Re: Bootstrap failure/ ICE in rtl.h (was: Re: [PATCH 225/236] Work towardgmane.comp.gcc.patchess NEXT_INSN/PREV_INSN requiring insns as their params) From: David Malcolm To: Tobias Burnus Cc: Richard Henderson , gcc-patches@gcc.gnu.org Date: Tue, 19 Aug 2014 21:56:06 -0400 In-Reply-To: <53F3CC68.8080600@net-b.de> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-226-git-send-email-dmalcolm@redhat.com> <53F3BA30.4050301@redhat.com> <1408484146.2473.128.camel@surprise> <53F3CC68.8080600@net-b.de> Mime-Version: 1.0 X-IsSubscribed: yes On Wed, 2014-08-20 at 00:15 +0200, Tobias Burnus wrote: > I am not sure about which patch causes the problem, but with Rev. 214197 > boostrapping fails here (x86-64-gnu-linux) while an incremental build > with a few other of your changes it worked. > > Currently, it fails in Stage 1 with the Stage 1 compiler with the > following message. > > Tobias > > > ../../../../libgcc/soft-fp/subtf3.c: In function '__subtf3': > ../../../../libgcc/soft-fp/subtf3.c:51:1: internal compiler error: > Segmentation fault > } > ^ > 0xc4856a crash_signal > ../../gcc/toplev.c:337 > 0x763f08 bool is_a_helper::test(rtx_def*) > ../../gcc/rtl.h:683 > 0x7646a9 bool is_a(rtx_def*) > ../../gcc/is-a.h:182 > 0x7e9228 rtx_insn* as_a(rtx_def*) > ../../gcc/is-a.h:192 > 0x7e6b5c duplicate_insn_chain(rtx_def*, rtx_def*) > ../../gcc/cfgrtl.c:4169 > 0x7e6c65 cfg_layout_duplicate_bb > ../../gcc/cfgrtl.c:4191 > 0x7ce90b duplicate_block(basic_block_def*, edge_def*, basic_block_def*) > ../../gcc/cfghooks.c:1042 > 0x130356d copy_bb > ../../gcc/bb-reorder.c:819 > 0x1304b5c connect_traces > ../../gcc/bb-reorder.c:1294 > 0x1306b27 reorder_basic_blocks > ../../gcc/bb-reorder.c:2258 > 0x1306d54 execute > ../../gcc/bb-reorder.c:2352 > Please submit a full bug report, Sorry about that. I'm not sure why this didn't make the bootstrap of patches 30-39 fail, but I was able to reproduce the crash you saw. The issue was with the as_a<> that I introduced at the end of duplicate_insn_chain in r214197 (patch #35), which requires a non-NULL insn. Converting it to a safe_as_a<> fixes the bootstrap. I went ahead and committed the fix to trunk, as r214207 (patch attached for reference). Sorry again. Dave Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 214206) +++ gcc/ChangeLog (revision 214207) @@ -1,3 +1,9 @@ +2014-08-20 David Malcolm + + * cfgrtl.c (duplicate_insn_chain): Convert the checked cast on + "insn" from an as_a to a safe_as_a, for the case when "insn" is + NULL. + 2014-08-20 Manuel López-Ibáñez PR preprocessor/51303 Index: gcc/cfgrtl.c =================================================================== --- gcc/cfgrtl.c (revision 214206) +++ gcc/cfgrtl.c (revision 214207) @@ -4166,7 +4166,7 @@ } insn = NEXT_INSN (last); delete_insn (last); - return as_a (insn); + return safe_as_a (insn); } /* Create a duplicate of the basic block BB. */