summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-30 03:22:28 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-30 03:22:28 +0000
commita7765dea36c5810d4250c01bacd9562bd61d06f2 (patch)
treee7828efd56c2d143b2b7e19ee26f1ecefacc326f /libgfortran
parent0d886fcd5208941f99104d1c5e88787384611ada (diff)
downloadgcc-a7765dea36c5810d4250c01bacd9562bd61d06f2.tar.gz
2010-03-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265 * io/transfer.c (next_record_r): Only call hit_eof for specific conditions when an EOF is encountered. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157810 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/transfer.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 4958831010e..2385b64483c 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/43265
+ * io/transfer.c (next_record_r): Only call hit_eof for specific
+ conditions when an EOF is encountered.
+
2010-03-29 Tobias Burnus <burnus@net-b.de>
PR fortran/43551
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;
}