This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/28276] EXPONENT() broken for real constants



------- Comment #7 from sgk at troutmask dot apl dot washington dot edu  2006-09-11 19:33 -------
Subject: Re:  EXPONENT() broken for real constants

On Mon, Sep 11, 2006 at 07:19:41PM -0000, sgk at troutmask dot apl dot
washington dot edu wrote:
> 
> gfortran is calling the wrong libm function.  -fdump-tree-original 
> on FreeBSD shows
> 
> {
>   real10 D.1254;
> 
>   D.1254 = scalbn(_gfortran_fraction_r10(a10),_gfortran_exponent_r10(a10))/a10;
>   _gfortran_transfer_real (&dt_parm.2, &D.1254, 10);
> }
> 
> That should be scalbnl().  I'll see if I can track down the bug.
> 

I should also note that the parsing is correct as shown by -fdump-parse-tree


ASSIGN MAIN__:a10 1.00000000000000000000_10
ASSIGN MAIN__:a10 (/ __scale_10[[((__fraction_10[[((MAIN__:a10))]])
(__exponent_10[[((MAIN__:a10))]]))]] MAIN__:a10)

So it's the translation of __scale_10 to scalbnl.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]