aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-06-10 22:50:47 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-06-10 22:50:47 +0000
commit82fa3fc0d3abf85a2d5e281cc01621fe4177c046 (patch)
treef3a1e82bfd964cf5b4481675caa7a220c0c9954a /libgfortran
parent51c0074eed92e71feb016b7e1165bafc89b92839 (diff)
downloadgcc-82fa3fc0d3abf85a2d5e281cc01621fe4177c046.zip
gcc-82fa3fc0d3abf85a2d5e281cc01621fe4177c046.tar.gz
gcc-82fa3fc0d3abf85a2d5e281cc01621fe4177c046.tar.bz2
re PR fortran/32235 (incorrectly position text file after backspace)
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. From-SVN: r125606
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 1ef8416..cbd3e1e 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 24bcc5e..6e3ae30 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: