This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: more remapping fortran math functions


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


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