I found a problem with writing an unformatted file after reading from it and encountering an end-of-file during this reading. In that case it is not possible to write to the file anymore.
I do not know what the standard says about this, but ifort accepts this. [EMAIL PROTECTED]:~/chemie/sources/gfortran-bugs/write > cat write.f90 program bla implicit none integer, parameter :: iunit=30 character(len=8) :: b OPEN(IUNIT,FILE="BLA",STATUS='NEW',FORM='UNFORMATTED') read (IUNIT, ERR=10, END=10) B 10 continue write (iunit) "bla" CLOSE(IUNIT) end program bla [EMAIL PROTECTED]:~/write > gfortran-4.0.2 write.f90 [EMAIL PROTECTED]:~/write > ./a.out At line 12 of file write.f90 Fortran runtime error: End of record -- Summary: end-of-record error when writing Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chjacob at web dot de GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24796