------- Comment #8 from jvdelisle at gcc dot gnu dot org 2009-09-18 19:20 ------- Here is a new test case, closely related, reported on fortran list:
http://gcc.gnu.org/ml/fortran/2009-09/msg00126.html The read of the last line in a file without the end-of-line marker should be treated as seeing and EOR. program test character (len=80) :: u character (len=20) :: filename integer :: n, k=0 n = iargc() if (n > 0) then call getarg(1,filename) else stop 'argument missing' endif open(unit=1,file=filename,status='old') do read(1,'(a80)',end=100,err=101) u k = k+1 print*,k,' : ',u(1:len_trim(u)) enddo 100 stop 100 101 stop 101 end program test -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.5.0 Known to work|4.5.0 |4.3.0 Summary|[4.4 regression] bad iostat |[4.4, 4.5 regression] bad |when reading DOS file in a |iostat when reading DOS file |character array (non- |in a character array (non- |advancing) |advancing) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41328