[patch, libgfortran] PR29563 Internal read loses data FIX
Jerry DeLisle
jvdelisle@verizon.net
Thu Oct 26 06:35:00 GMT 2006
:ADDPATCH fortran:
The attached patch fixes the problem for list directed reads by returning a '/n'
in next_char when the end of the last record occurs. Previously we were doing a
long jmp to the EOF code and never returned a separator for the last read so
that the value would be processed and saved into the input variable location.
Touched up a couple of comments as well for format.
Regression tested on i686-linux.
OK for 4.3? What about 4.2? It would be preferable to include this before
release, but not critical.
Regards,
Jerry
2006-10-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/29563
* io/io.h (st_parameter_dt): Add new flag at_eof.
* io/list_read.c (next_char): Set flag when EOF and return '\n' to
signal EOR. Check flag on next call and jump out.
* io/unit.c (get_internal_unit): Initialize new flag.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr29563.diff
Type: text/x-patch
Size: 3704 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061026/67b9e34f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_9.f90
Type: text/x-fortran
Size: 465 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061026/67b9e34f/attachment-0001.bin>
More information about the Fortran
mailing list