From: Jerry DeLisle Date: Sun, 7 Jun 2009 17:40:24 +0000 (+0000) Subject: re PR libfortran/40334 (changed BACKSPACE behaviour at end of file.) X-Git-Tag: releases/gcc-4.5.0~5336 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=690aefeba465a8fc85b779fa56d24ad892f17281;p=thirdparty%2Fgcc.git re PR libfortran/40334 (changed BACKSPACE behaviour at end of file.) 2009-06-07 Jerry DeLisle 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index c1204932abea..6558936b1d02 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2009-06-07 Jerry DeLisle + + PR libfortran/40334 + * io/list_read.c (list_formatted_read_scalar): Set the end file + conditions after a return from EOF error. + 2009-06-04 Janne Blomqvist PR libfortran/40330 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 7cd1f6089de6..f6d5687ba8e2 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; }