From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10932 invoked by alias); 13 Apr 2010 20:02:04 -0000 Received: (qmail 7381 invoked by uid 48); 13 Apr 2010 20:01:49 -0000 Date: Tue, 13 Apr 2010 20:02:00 -0000 Message-ID: <20100413200149.7380.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/43716] [4.6 Regression] Revision 158105 miscompiles doduc.f90 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mkuvyrkov at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01321.txt.bz2 ------- Comment #14 from mkuvyrkov at gcc dot gnu dot org 2010-04-13 20:01 ------- (In reply to comment #10) > - D.1850_209 = -alt_90; > - D.2093_151 = -alb_86; > - D.1849_208 = D.1848_207 - alb_86; > + D.2093_151 = -alt_90; > + D.1849_208 = D.1848_207 - alt_90; > D.1851_210 = D.1849_208 + -1.0e+0; > - z1a_211 = D.1851_210 + D.1850_209; > + D.2094_497 = -alb_86; > + z1a_211 = D.1851_210 - alb_86; > > this doesn't look like an identity transform. You have to be careful with > non-single use vars and make sure they do not end up on a reassociation > chain. Though it does look fishy, this transformation is OK. In fact, the compiler oscillates a couple of times between using `-alb_86' and `-alt_90'. E.g., the "before" compiler does the following transformation during reassoc1: == - D.1849_208 = D.1848_207 - alb_86; + D.2045_228 = -alb_86; + D.1850_209 = -alt_90; + D.1849_208 = D.1848_207 + D.1850_209; == -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43716