This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2007 17:50:46 -0000
- Subject: [Bug rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr
- References: <bug-33638-9562@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from kargl at gcc dot gnu dot org 2007-10-05 17:50 -------
(In reply to comment #9)
> > Hope this helps.
> Sure, I've got the problem. The problem is actually in RTL optimization, where
> dse1 pass removes wrong insn.
>
> Suprisingly, the problem is in line 61 of comunpack.f:
>
> --> bscale = 2.0**real(idrstmpl(2))
> dscale = 10.0**real(-idrstmpl(3))
>
This meant for Manfred instead of Uros, but it does contain the
relevant info. Manfred, you told me elsewhere that you use -fforce-addr
to achieve better performance. Whoever wrote this code should be
flogged. idrstmpl is an INTEGER variable, and gfortran can generate
much faster code for integer exponents than calling __builtin_powf.
Try changing the lines to
bscale = 2.0**idrstmpl(2)
dscale = 10.0**(-idrstmpl(3))
This, of course, doesn't fix the underlying bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33638