diff options
author | Paul Brook <paul@codesourcery.com> | 2004-11-10 02:19:27 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-11-10 02:19:27 +0000 |
commit | 2cbcdebaf9da99f581c309564fc5e458c8725d47 (patch) | |
tree | f1a70346c066ae259be7cf608066ff4eebd910b6 /gcc | |
parent | 4ef509c05829d8ae5df462a4fdf12208fa2745ac (diff) | |
download | gcc-2cbcdebaf9da99f581c309564fc5e458c8725d47.zip gcc-2cbcdebaf9da99f581c309564fc5e458c8725d47.tar.gz gcc-2cbcdebaf9da99f581c309564fc5e458c8725d47.tar.bz2 |
re PR fortran/18218 (Miscompare in sixtrack benchmark caused by loss of precision)
PR fortran/18218
* configure.ac: Check for strtof.
* configure: Regenerate.
* config.h.in: Regenerate.
* io/read.c (convert_real): Use strtof if available.
(convert_precision_real): Remove.
(read_f): Avoid poor exponentiation algorithm.
gcc/testsuite/
* gfortran.dg/list_read.c: New test.
From-SVN: r90382
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/read_float_1.f90 | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index df1eaa3..ce5a2b1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-11-10 Paul Brook <paul@codesourcery.com> + + PR fortran/18218 + * gfortran.dg/list_read.c: New test. + 2004-11-09 Joseph S. Myers <joseph@codesourcery.com> PR c/18322 diff --git a/gcc/testsuite/gfortran.dg/read_float_1.f90 b/gcc/testsuite/gfortran.dg/read_float_1.f90 new file mode 100644 index 0000000..e38036f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/read_float_1.f90 @@ -0,0 +1,12 @@ +! { dg-do run } +! PR18218 +! The IO library has an algorithm that involved repeated multiplication by 10, +! resulting in introducing large cumulative floating point errors. +program foo + character*20 s + real*8 d + s = "-.18774312893273 " + read(unit=s, fmt='(g20.14)') d + if (d + 0.18774312893273d0 .gt. 1d-13) call abort +end program + |