From patchwork Mon Jun 16 08:04:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 359970 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 787C114007C for ; Mon, 16 Jun 2014 18:04:36 +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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=yHHv7uGsIcmpAPpJ xsFDLkkF3Zb2iItWF+qKjcaFqRxGSomchJ+3WKLnir2/8COKd/FBm2FX5XcWQFZm YyUgNd80grRakJesN4pfapf6hw9iO+LM4D+EziLowRbdpsbCEYGylyOZga7+HBT/ OJYEN4g+ltY0FVdMS7F5g97lfXQ= 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=cR8x9lvBG+cGIj6BUGDxc4 qZ5to=; b=natBbhyH4C5sPjHqsfJ+xhsLqJTwq1Cs3Mc9H2fXHcDVgk3NGLj6Sh lr8IQCIkfG+pQ1MujhAh8T4WpU/34ylzrTJMD3ZEg2lSPDtR6XgDa5W4SqZxBqYE 7xp7hNLbc+iOsiiZUO5if+J+0+Va3IIXP3r18X8WLMTiB+8jTYWHk= Received: (qmail 25909 invoked by alias); 16 Jun 2014 08:04:19 -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 25821 invoked by uid 89); 16 Jun 2014 08:04:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 16 Jun 2014 08:04:17 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 590D9ACB8; Mon, 16 Jun 2014 08:04:14 +0000 (UTC) From: Andreas Schwab To: Hans-Peter Nilsson Cc: Steven Bosscher , Richard Sandiford , GCC Patches Subject: Re: breakage with "[PATCH 1/6] Add FOR_EACH_INSN{_INFO}_{DEFS, USES, EQ_USES}" References: <87a99ftha6.fsf@talisman.default> <8761k3tgys.fsf@talisman.default> X-Yow: Boy, am I glad it's only 1971... Date: Mon, 16 Jun 2014 10:04:14 +0200 In-Reply-To: (Hans-Peter Nilsson's message of "Sun, 15 Jun 2014 19:39:08 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Hans-Peter Nilsson writes: > On Sun, 15 Jun 2014, Hans-Peter Nilsson wrote: > >> On Sun, 15 Jun 2014, Hans-Peter Nilsson wrote: >> > On Sun, 15 Jun 2014, Steven Bosscher wrote: >> > > Can you please try: >> > > >> > > [...] >> > >> > Thanks. Looks pretty obvious. I was heading for the door with >> > just enough time to report the issue, so I didn't actually look >> > at the code before. I'll commit this on your behalf once build >> > has passed the point of failure. >> >> ...which includes not just compiling auto-inc-dec.c but also >> compiling e.g. libgcc with the compiled compiler. No such luck, >> segv in that function (must be from Richard's code, not from the >> patch as no dumps are output at that time). Bah. > > Ok, I'm out; I don't know why the insn_info is invalid here. > Hopefully obvious to you or Richard. PR61516 for this. Please try this: Andreas. diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c index 64a3706..d84e097 100644 --- a/gcc/auto-inc-dec.c +++ b/gcc/auto-inc-dec.c @@ -1341,6 +1341,7 @@ merge_in_block (int max_reg, basic_block bb) FOR_BB_INSNS_REVERSE_SAFE (bb, insn, curr) { + unsigned int uid = INSN_UID (insn); df_insn_info *insn_info = DF_INSN_INFO_GET (insn); bool insn_is_add_or_inc = true; @@ -1417,7 +1418,7 @@ merge_in_block (int max_reg, basic_block bb) /* If the inc insn was merged with a mem, the inc insn is gone and there is noting to update. */ - if (insn_info) + if (DF_INSN_UID_GET (uid)) { df_ref def, use;