[patch, libgfortran] [4.3/4.4/4.5 Regression] I/O: Problems reading partial records in formatted direct access files
Jerry DeLisle
jvdelisle@verizon.net
Thu Nov 19 08:36:00 GMT 2009
Hi Folks,
This patch is fairly straight forward. We were calling skip_record telling it
to skip 0 bytes. Then in skip_record we tested for zero bytes and returned,
doing nothing. I guess we never thought of a partial read before. ;)
Regression tested on X86-64 linux.
Test case provided.
OK for trunk and 4.4 and 4.3?
Regards,
Jerry
2009-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/42090
* io/transfer.c (skip_record): Set bytes_left_subrecord to zero after
skipping the remaining bytes in the record.
(next_record_r): Call skip_record with the number of bytes_left to be
skipped.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: direct_io_11.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091119/252c8f0d/attachment.f90>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42090.diff
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091119/252c8f0d/attachment.bin>
More information about the Fortran
mailing list