PR fortran/18218
[official-gcc.git] / gcc / testsuite / gfortran.dg / read_float_1.f90
blobe38036f8b92c846ee3e44b10cab0c8472791fd4e
1 ! { dg-do run }
2 ! PR18218
3 ! The IO library has an algorithm that involved repeated multiplication by 10,
4 ! resulting in introducing large cumulative floating point errors.
5 program foo
6 character*20 s
7 real*8 d
8 s = "-.18774312893273 "
9 read(unit=s, fmt='(g20.14)') d
10 if (d + 0.18774312893273d0 .gt. 1d-13) call abort
11 end program