https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101918

--- Comment #11 from kargl at gcc dot gnu.org ---
(In reply to Rimvydas (RJ) from comment #7)
At least some common examples of what to look for in
> documentation about "gfortran -fdefault-real-8 -fdefault-double-8"
> limitations (if these options are really that broken) would be very
> appreciated by the software porters :)

% cat foo.f90
program foo
   x = 1.
   y = 3.14159
   a = 1._4
   b = 3.14159_4
   print *, a / b
   print *, x/ y
end program foo
% gfcx -o z a.f90 && ./z
  0.318310142    
  0.318310142    
% gfcx -o z -fdefault-real-8 a.f90 && ./z
  0.31831014305159744     
  0.31831015504887655     
% gfcx -o z -freal-4-real-8 a.f90 && ./z
  0.31831015504887655     
  0.31831015504887655     

One of these is no like the others. Yes, the behavior is documented,
and the unlike other result is likely the result that is no desired
unless the user enjoys chancing numerical precision issues.

Reply via email to