This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28276] EXPONENT() broken for real constants
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2006 19:33:34 -0000
- Subject: [Bug fortran/28276] EXPONENT() broken for real constants
- References: <bug-28276-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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