aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2009-06-07 17:40:24 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2009-06-07 17:40:24 +0000
commit690aefeba465a8fc85b779fa56d24ad892f17281 (patch)
treeb08e2d76f68c8f7f9c7cf363e710cd8aab81fb92 /libgfortran/io
parentc430a6f9f8d4b0c65daa2a300378b31ccfacb9d7 (diff)
downloadgcc-690aefeba465a8fc85b779fa56d24ad892f17281.zip
gcc-690aefeba465a8fc85b779fa56d24ad892f17281.tar.gz
gcc-690aefeba465a8fc85b779fa56d24ad892f17281.tar.bz2
re PR libfortran/40334 (changed BACKSPACE behaviour at end of file.)
2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/40334 * io/list_read.c (list_formatted_read_scalar): Set the end file conditions after a return from EOF error. From-SVN: r148251
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/list_read.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 7cd1f60..f6d5687 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1687,6 +1687,11 @@ list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
if (setjmp (eof_jump))
{
generate_error (&dtp->common, LIBERROR_END, NULL);
+ if (!is_internal_unit (dtp))
+ {
+ dtp->u.p.current_unit->endfile = AFTER_ENDFILE;
+ dtp->u.p.current_unit->current_record = 0;
+ }
goto cleanup;
}