]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/40334 (changed BACKSPACE behaviour at end of file.)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 7 Jun 2009 17:40:24 +0000 (17:40 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 7 Jun 2009 17:40:24 +0000 (17:40 +0000)
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

libgfortran/ChangeLog
libgfortran/io/list_read.c

index c1204932abea0f80eccf3114e607ed414bb99d01..6558936b1d026bba0ff0723d140738da09d35104 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2009-06-04  Janne Blomqvist  <jb@gcc.gnu.org>
 
        PR libfortran/40330
index 7cd1f6089de6703eafb19acf511a0bf97d5a32e7..f6d5687ba8e2c03a9099e0009663e8293c1c51e4 100644 (file)
@@ -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;
     }