more remapping fortran math functions

Steve Kargl sgk@troutmask.apl.washington.edu
Wed May 30 04:17:00 GMT 2007


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



More information about the Fortran mailing list