------- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-03-31 01:45 ------- Michael sent me this excellent test case illustrating the problem.
PROGRAM test CHARACTER(LEN=8) :: as_written, as_read as_written = "12345678" OPEN (76, FILE="test.txt", ACCESS="DIRECT", STATUS="NEW", RECL=12) WRITE(76, REC=1) as_written READ(76, REC=1) as_read, i PRINT *, "as_written = ", as_written, " as_read = ", as_read CLOSE(76) END PROGRAM test -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Summary|When the last record written|Last record truncated for |to a direct access file is |read after short write, |shorter than the record |direct access file |length of the file, gfortran| |truncates the record | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31366