summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/fmt_read.f90
blob: 9d34aeaf4370d68f6e5fdf0b31fea88923d5eda8 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do run }
! pr18398, missing data on sequential formatted reads
! test contributed by Thomas.Koenig@online.de
      open(7,status='scratch')
      write (7,'(F12.5)') 1.0, 2.0, 3.0
      rewind(7)
      read(7,'(F15.5)') a,b
!   note the read format is wider than the write
      if (abs(a-1.0) .gt. 1e-5) STOP 1
      if (abs(b-2.0) .gt. 1e-5) STOP 2
      end