summaryrefslogtreecommitdiffstats
path: root/libgfortran/io/transfer.c
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-01 17:32:20 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-01 17:32:20 +0000
commit49b5b3850ef5af1b34e93d46c788ac77be1259bc (patch)
tree33215bd612d3c257ba2f81ab28d1449710cbb577 /libgfortran/io/transfer.c
parentccfa609a4ed2efc76539be2d9a31bd9c581f8500 (diff)
downloadppe42-gcc-49b5b3850ef5af1b34e93d46c788ac77be1259bc.tar.gz
ppe42-gcc-49b5b3850ef5af1b34e93d46c788ac77be1259bc.zip
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31052 * io/open.c (test_endfile): Delete this function. (edit_modes): Delete call to test_endfile. (new_unit): Likewise. * io/io.h: Delete prototype for test_endfile. * io/transfer.c (next_record_r): Remove use of test_endfile. (st_read): Add test for end file condition and adjust status. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r--libgfortran/io/transfer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 3c6deb4998c..65d83ef465c 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -2226,10 +2226,6 @@ next_record_r (st_parameter_dt *dtp)
break;
}
-
- if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL
- && !dtp->u.p.namelist_mode)
- test_endfile (dtp->u.p.current_unit);
}
@@ -2702,6 +2698,9 @@ st_read (st_parameter_dt *dtp)
switch (dtp->u.p.current_unit->endfile)
{
case NO_ENDFILE:
+ if (file_length (dtp->u.p.current_unit->s)
+ == file_position (dtp->u.p.current_unit->s))
+ dtp->u.p.current_unit->endfile = AT_ENDFILE;
break;
case AT_ENDFILE:
OpenPOWER on IntegriCloud