From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout1.freenet.de (mout1.freenet.de [IPv6:2001:748:100:40::2:3]) by sourceware.org (Postfix) with ESMTPS id 3AD27386187E for ; Mon, 24 Aug 2020 19:09:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3AD27386187E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=justmail.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gnikl@justmail.de Received: from [195.4.92.164] (helo=mjail1.freenet.de) by mout1.freenet.de with esmtpa (ID gnikl@justmail.de) (port 25) (Exim 4.92 #3) id 1kAHq3-00012M-Dw; Mon, 24 Aug 2020 21:09:03 +0200 Received: from localhost ([::1]:40316 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID gnikl@justmail.de) (Exim 4.92 #3) id 1kAHq3-0007CI-D0; Mon, 24 Aug 2020 21:09:03 +0200 Received: from sub3.freenet.de ([195.4.92.122]:36800) by mjail1.freenet.de with esmtpa (ID gnikl@justmail.de) (Exim 4.92 #3) id 1kAHnS-0005jO-Px; Mon, 24 Aug 2020 21:06:22 +0200 Received: from p5dc3f1a6.dip0.t-ipconnect.de ([93.195.241.166]:50982 helo=localhost) by sub3.freenet.de with esmtpsa (ID gnikl@justmail.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.92 #3) id 1kAHnS-00024L-Ei; Mon, 24 Aug 2020 21:06:22 +0200 Date: Mon, 24 Aug 2020 21:06:20 +0200 From: Gunther Nikl To: stefan@franke.ms (Stefan Franke), gcc-help@gcc.gnu.org Subject: Re: C and C++ parser performing optimizations Message-ID: <20200824210620.00005690@justmail.de> In-Reply-To: <000301d66a2a$ad8dcb50$08a961f0$@franke.ms> References: <00cd01d668f8$eb26b950$c1742bf0$@franke.ms> <000301d66a2a$ad8dcb50$08a961f0$@franke.ms> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originated-At: 93.195.241.166!50982 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 19:09:07 -0000 stefan@franke.ms (Stefan Franke) wrote: > > Von: Alexander Monakov > > Betreff: Re: C and C++ parser performing optimizations > > > > On Sun, 2 Aug 2020, Stefan Franke wrote: > > > > > So the parser performs unwanted and uncontrollable optimizations, > > > which I consider bogus. > > > > On occasion they are also incorrect. > > > > My (possibly wrong or incomplete) understanding is that GCC does > > not have internal separation of mandatory simplifications that need > > to be done in > the > > frontend (like constant folding in the context of integer constant > > expressions) vs. optional simplifications (optimizing > > substitutions). So it just does both at the same time. > > > > Alexander > > Here is an example where gcc creates wrong code: > > test.c: > int foo() { > const char * const txt = "hello"; > register const char * const p asm("ecx") = txt; > register int dx asm("edx"); > asm(" call _faa" :"=r" (dx) :"rf" (p)); > } Let me guess: this is about the m68k-amigaos LP macros? Can you show an example for that target? Gunther