Need interpretation



Hi Folks,

Which is the correct behavior here?:

On i686-pc-linux-gnu:

$ cat back3.f
      integer dat(5)
      dat = (/ 0, 0, 0, 0, 1 /)
      write(11) dat,dat,dat,dat
      rewind 11
      write(11) dat
      read(11,end=1008) dat
      call abort()
 1008 continue
!      backspace 11
!      write(11) dat
      read(11,end=1011) dat
      print *, 'failed'
 1011 continue
      backspace 11
      backspace 11
      end

$ gfc back3.f
$ ./a.out
At line 11 of file back3.f
Fortran runtime error: Read past ENDFILE record
$ ifc back3.f
$ ./a.out
$
gfortran and ifort give different results with those two lines commented out. I am trying to determine if I have a bug here or not.


Regards,

Jerry
.