[patch, libgfortran] PR29563 Internal read loses data FIX
Jerry DeLisle
jvdelisle@verizon.net
Thu Oct 26 11:19:00 GMT 2006
Steve Kargl wrote:
> On Wed, Oct 25, 2006 at 09:06:17PM -0700, Jerry DeLisle wrote:
>> 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.
>>
>
> OK for 4.3. Tentative OK for 4.2 (ask markm).
>
After committing this to 4.3 branch I discovered a glitch. I was just staring
at it and thinking and another test case popped into my mind. The attached
patch fixes it. I was failing to return a '\n' at the end of each record so if
the character array unit is completely full, with no separators, we would get an
error. The attached patch and additional test case illustrates this.
Regression tested OK.
I will commit the fix to 4.3 shortly.
Please accept my apologies.
Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr29563-a.diff
Type: text/x-patch
Size: 1154 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061026/1c2c2097/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_9.f90
Type: text/x-fortran
Size: 462 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061026/1c2c2097/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_10.f90
Type: text/x-fortran
Size: 441 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061026/1c2c2097/attachment-0002.bin>
More information about the Fortran
mailing list