summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-10 22:50:47 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-10 22:50:47 +0000
commitabfff654928f40b8f96718b0bd828315535627cd (patch)
treef3a1e82bfd964cf5b4481675caa7a220c0c9954a /libgfortran
parenta89f7eec51b548f86f04ee7fcea2fc4fd66b67a5 (diff)
downloadgcc-abfff654928f40b8f96718b0bd828315535627cd.tar.gz
2007-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/32235 * io/transfer.c (st_read): Remove test for end of file condition. (next_record_r): Add test for end of file condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125606 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 1ef8416ec83..cbd3e1e171b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/32235
+ * io/transfer.c (st_read): Remove test for end of file condition.
+ (next_record_r): Add test for end of file condition.
+
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
* configure: Regenerate.
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 24bcc5e1a3e..6e3ae30b140 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -2268,6 +2268,14 @@ next_record_r (st_parameter_dt *dtp)
break;
}
+
+ if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL
+ && !dtp->u.p.namelist_mode
+ && dtp->u.p.current_unit->endfile == NO_ENDFILE
+ && (file_length (dtp->u.p.current_unit->s) ==
+ file_position (dtp->u.p.current_unit->s)))
+ dtp->u.p.current_unit->endfile = AT_ENDFILE;
+
}
@@ -2742,9 +2750,6 @@ 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: