From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 9D29F383983E for ; Mon, 6 Jun 2022 15:52:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D29F383983E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 72D3CBBBA5; Mon, 6 Jun 2022 17:52:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id svYlajcFyLsi; Mon, 6 Jun 2022 17:52:30 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508554ce.dip0.t-ipconnect.de [80.133.84.206]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id E570CBB7F5; Mon, 6 Jun 2022 17:52:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1654530750; bh=TetN9m7wtT0WM7BOa1kcH4Zk5JUA7ip+KjImauXna+A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hHdRYyFBedqijZMqo1eAd8hWT2+9S6H9MwrleHMkqkJb8D7yRcZEVBYbJBgGzulOf KWt3o1bFDnZEWmXM3iqHaterb7zdVNwAKfDlnu2swYXyfBS/2E7pJ6RnLL7L3dpIV5 h2+K/Fk691tv5NfLLfubiMp9MU1bWgkoU4PKQmpy355OqnAz6Srt8IRSriM7dNQ7rh mbr+V/GKuO8v8wre3QvJYPkyTg0dkLg3nxJ85ViHTA0oFs6z8SzbiL14y1WZadNy6Q yd4tiqBroInqQPO9DXde2PkcLmhjYRiJhaH7BKPdsRUNfwmR+W6y0i8Iz4b6jz5UCp bBwDFuds/WLbg== From: Rainer Orth To: "Roger Sayle" Cc: "'Andreas Schwab'" , Subject: Re: [PING] PR middle-end/95126: Expand small const structs as immediate constants References: <006d01d86d00$777e67b0$667b3710$@nextmovesoftware.com> <87czfnf148.fsf@igel.home> <036701d87981$91cc3150$b56493f0$@nextmovesoftware.com> <056b01d879a1$1fdccfd0$5f966f70$@nextmovesoftware.com> Date: Mon, 06 Jun 2022 17:52:29 +0200 In-Reply-To: <056b01d879a1$1fdccfd0$5f966f70$@nextmovesoftware.com> (Roger Sayle's message of "Mon, 6 Jun 2022 13:29:50 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3793.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_STOCKGEN, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 15:52:33 -0000 Hi Roger, >> I just tried this on i386-pc-solaris2.11: unfortunately, it made no > difference. > > Awesome! Very many thanks for trying this. Alas it confirms that the patch > I'm currently spinning won't have any affect. So by a process of > elimination, > the miscompilation must be triggered by one of the other two changes: > > diff --git a/gcc/expr.cc b/gcc/expr.cc > index fb062dc..37f1405 100644 > --- a/gcc/expr.cc > +++ b/gcc/expr.cc > @@ -4871,7 +4871,7 @@ emit_push_insn (rtx x, machine_mode mode, tree type, > rtx s > /* If source is a constant VAR_DECL with a simple constructor, > store the constructor to the stack instead of moving it. */ > const_tree decl; > - if (partial == 0 > + if (0 && partial == 0 > && MEM_P (xinner) > && SYMBOL_REF_P (XEXP (xinner, 0)) > && (decl = SYMBOL_REF_DECL (XEXP (xinner, 0))) != NULL_TREE > @@ -10603,7 +10603,7 @@ expand_expr_real_1 (tree exp, rtx target, > machine_mode t > } > /* Expand const VAR_DECLs with CONSTRUCTOR initializers that > have scalar integer modes to a reg via store_constructor. */ > - if (TREE_READONLY (exp) > + if (0 && TREE_READONLY (exp) > && !TREE_SIDE_EFFECTS (exp) > && (modifier == EXPAND_NORMAL || modifier == EXPAND_STACK_PARM) > && immediate_const_ctor_p (DECL_INITIAL (exp)) I've tried both chunks individually: the second one allowed the build to finish successfully. Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University