[Bug fortran/31366] Last record truncated for read after short write, direct access file

jvdelisle at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Mar 31 05:06:00 GMT 2007



------- 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



More information about the Gcc-bugs mailing list