X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libgfortran%2Fio%2Ftransfer.c;h=93c0e03c25d5f6489be909263fcc50d4f1102c99;hp=7f6750d21563d9eb1f33e2f69c7bc541e38dc1fe;hb=a7765dea36c5810d4250c01bacd9562bd61d06f2;hpb=0d886fcd5208941f99104d1c5e88787384611ada diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 7f6750d2156..93c0e03c25d 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -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; }