------- Comment #7 from tkoenig at alice-dsl dot net 2007-03-31 08:11 ------- Subject: Re: Last record truncated for read after short write, direct access file
On Sat, 2007-03-31 at 00:45 +0000, jvdelisle at gcc dot gnu dot org wrote: > 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 Hi Jerry, this reads a variable that we haven't written. I am not convinced that this is standard-conforming. I'll ask on c.l.f. Thomas -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31366