This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
* io/transfer.c (next_record_r): Only call hit_eof for specific conditions when an EOF is encountered.
Index: transfer.c =================================================================== --- transfer.c (revision 157809) +++ transfer.c (working copy) @@ -2848,9 +2848,14 @@ next_record_r (st_parameter_dt *dtp, int done) { if (errno != 0) generate_error (&dtp->common, LIBERROR_OS, NULL); - else if (dtp->u.p.item_count == 1 - || dtp->u.p.pending_spaces == 0) - hit_eof (dtp); + else + { + if (is_stream_io (dtp) + || dtp->u.p.current_unit->pad_status == PAD_NO + || dtp->u.p.current_unit->bytes_left + == dtp->u.p.current_unit->recl) + hit_eof (dtp); + } break; }
Attachment:
read_eof_8.f90
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |