This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31366] Last record truncated for read after short write, direct access file
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Mar 2007 05:06:35 -0000
- Subject: [Bug fortran/31366] Last record truncated for read after short write, direct access file
- References: <bug-31366-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-03-31 06:06 -------
Here is a preliminary patch for this.
Index: io/transfer.c
===================================================================
*** io/transfer.c (revision 123355)
--- io/transfer.c (working copy)
*************** read_block_direct (st_parameter_dt *dtp,
*** 411,417 ****
/* Short read, e.g. if we hit EOF. Apparently, we read
more than was written to the last record. */
*nbytes = to_read_record;
- generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL);
return;
}
--- 411,416 ----
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31366