OSDN Git Service

2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jun 2009 17:40:24 +0000 (17:40 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jun 2009 17:40:24 +0000 (17:40 +0000)
PR libfortran/40334
* io/list_read.c (list_formatted_read_scalar): Set the end file
conditions after a return from EOF error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148251 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/list_read.c

index c120493..6558936 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 7cd1f60..f6d5687 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;
     }