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]

Failure of default_format_1.f90


FX,

It appears that either your testcase is bogus or (as I feared)
you broke gfortran cratering to the darwin platform.  I added
output to your test and see

       x =   2.22507385850710603E-308
 trim(s) =   2.22507385850710603E-308
       y =   2.22507385850710652E-308


program p
  print '(I0,1X,I0)', digits(1.d0), precision(1.d0)
end program p
troutmask:sgk[243] gfc4x -o z p.f90
troutmask:sgk[244] ./z
53 15

1 23456789012345
2.22507385850710652E-308
                ^^^
There are garbage.

One can either check /usr/include/float.h of the expected
number of decimal digits or use real_info->precision to
determine a desirable value.

-- 
Steve


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