This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: more remapping fortran math functions
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: fortran at gcc dot gnu dot org, mrs at apple dot com, geoffk at apple dot com
- Date: Tue, 29 May 2007 21:15:52 -0700
- Subject: Re: more remapping fortran math functions
- References: <20070530035450.GA14413@bromo.msbb.uc.edu>
On Tue, May 29, 2007 at 11:54:50PM -0400, Jack Howarth wrote:
> I figured out where in the fortran front-end the intrinsic libc
> math functions get converted from say 'exp' (as called in the .f90 sources)
> to 'expl' for long doubles. This is done by these macros in gcc/fortran/f95-lang.c.
>
AFAICT, gfortran is doing the Right Thing.
mobile:kargl[207] gfc4x -fdump-tree-original -c a.f90
mobile:kargl[208] cat a.f90
subroutine y(x)
real(10) x
x = 1._10
x = sqrt(x)
end
mobile:kargl[209] cat a.f90.003t.original
y (x)
{
*x = 1.0e+0;
*x = __builtin_sqrtl (*x);
It is either the middle end or backend's responsibility to
interpret __builtin_sqrtl().
--
Steve