aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/endfile.f
blob: 6ece5459fa366f59c67f6d89daf306dd41bbcc52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! PR25550 file data corrupted after reading end of file.
! Derived from example given in PR from Dale Ranta.
! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org> 
      integer data
      data=-1
      open(unit=11,status='scratch',form='unformatted')
      write(11)data
      read(11,end=1000 )data
      call abort()
 1000 continue
      rewind (11)
      read(11)data
 1001 continue
      if(data.ne.-1) call abort
      end