From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id A8C513857C5D; Tue, 16 Nov 2021 08:54:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8C513857C5D Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 72A542805B6; Tue, 16 Nov 2021 09:54:13 +0100 (CET) Date: Tue, 16 Nov 2021 09:54:13 +0100 From: Jan Hubicka To: "marxin at gcc dot gnu.org" Cc: gcc-bugs@gcc.gnu.org Subject: Re: [Bug ipa/103267] Wrong code with ipa-sra Message-ID: <20211116085413.GG71052@kam.mff.cuni.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 08:54:16 -0000 > @@ -1,4 +1,3 @@ > -static int > __attribute__ ((noinline,const)) > infinite (int p) > { Just for a record, it crahes with or without static int here for me :) I run across it because the code tracking must access in ipa-sra is IMO conceptually wrong. I noticed that because ipa-modref solves similar problem for kills (both need to verify that given access will always happen). The post-dominance check is not enough to verify that because earlier function calls can do things like EH. I failed to construct an actual testcase because on interesting stuff like EH we punt for other reasons (missed fnspec annotations on EH builtins). I will play with it more today.