This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/33469] Default formats for real input are not precise enough
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2007 19:30:06 -0000
- Subject: [Bug libfortran/33469] Default formats for real input are not precise enough
- References: <bug-33469-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from dominiq at lps dot ens dot fr 2007-10-03 19:30 -------
gcc/testsuite/gfortran.dg/default_format_1.f90 passes the test if I replace
if (y /= x) res = res + 1
by
z=0.0_k
if (abs(x-y)>nearest(z,1.0_k)) res = res + 1
in the two places of test_r8, i.e. the tests fail for TINY() because the result
differs from the original value by ~+/-5.0E-324: the smallest denormalized
number. I have noticed that this happens for an odd number of iterations of
NEAREST(), but I did not figure out if the culprit was the WRITE() or the
READ(). I have also seen the same problem with xlf and g95.
I suggest that the test includes this change and does not xfail on Darwin.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33469