This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31366] New: When the last record written to a direct access file is shorter than the record length of the file, gfortran truncates the record
- From: "michael dot a dot richmond at nasa dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2007 16:26:44 -0000
- Subject: [Bug fortran/31366] New: When the last record written to a direct access file is shorter than the record length of the file, gfortran truncates the record
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When the last record written to a direct access file is shorter than the record
length of the file, gfortran truncates the record. The following test program
produces a file whose length is 1 when it should be 10.
PROGRAM test
OPEN (76, FILE="test.txt", ACCESS="DIRECT", STATUS="NEW", RECL=10)
WRITE(76, REC=1) "1"
END PROGRAM test
--
Summary: When the last record written to a direct access file is
shorter than the record length of the file, gfortran
truncates the record
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31366