This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43716] [4.6 Regression] Revision 158105 miscompiles doduc.f90
- From: "mkuvyrkov at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Apr 2010 20:01:49 -0000
- Subject: [Bug tree-optimization/43716] [4.6 Regression] Revision 158105 miscompiles doduc.f90
- References: <bug-43716-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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