------- Comment #15 from zadeck at naturalbridge dot com  2007-10-05 20:17 
-------
Subject: Re:  [4.3 regression]: wrong code with
 -fforce-addr

kargl at gcc dot gnu dot org wrote:
> ------- 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.
>
>
>   
neither richi nor myself are able to reproduced the problem. 

./xgcc -B. -O2 -march=pentium4 -c mova2i.c -DLINUX
./gfortran -fforce-addr -B. -B../i686-pc-linux-gnu/libgfortran/.libs  -O2 -
march=pentium4 -o main main.f     comunpack.f rdieee.f gbytesc.f mova2i.o

and i get the same thing with and without -fforce-addr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33638

Reply via email to