------- Comment #8 from kargl at gcc dot gnu dot org 2010-06-20 16:41 ------- (In reply to comment #7) > The following occurs in the snapshot of June 19, but not in earlier snapshots: > > mrich...@msc545ux:~$ cat test.f90 > PROGRAM test > END FILE 10 > END FILE 10 > END PROGRAM test > mrich...@msc545ux:~$ gfortran test.f90 > mrich...@msc545ux:~$ ./a.out > At line 3 of file test.f90 (unit = 10, file = 'fort.10') > Fortran runtime error: Cannot perform ENDFILE on a file already positioned > after the EOF marker >
Did you read the error message? The code is invalid. For the Fortran 95 standard: After execution of an ENDFILE statement, a BACKSPACE or REWIND statement shall be used to reposition the file prior to execution of any data transfer input/output statement or ENDFILE statement. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477