OSDN Git Service

2009-09-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Sep 2009 04:41:38 +0000 (04:41 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Sep 2009 04:41:38 +0000 (04:41 +0000)
PR libgfortran/41328
* io/transfer.c (read_sf): Set at_eof flag on short read if any
characters were successfully read so that EOF condition with no EOR
marker succeeds.

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

libgfortran/ChangeLog
libgfortran/io/transfer.c

index 3469814..af4cbfd 100644 (file)
@@ -1,3 +1,10 @@
+2009-09-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/41328
+       * io/transfer.c (read_sf): Set at_eof flag on short read if any
+       characters were successfully read so that EOF condition with no EOR
+       marker succeeds.
+
 2009-09-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/41328
index 2362a15..4525bb4 100644 (file)
@@ -291,7 +291,7 @@ read_sf (st_parameter_dt *dtp, int * length, int no_error)
      some other stuff. Set the relevant flags.  */
   if (lorig > *length && !dtp->u.p.sf_seen_eor && !seen_comma)
     {
-      if (no_error)
+      if (n > 0 || no_error)
         dtp->u.p.at_eof = 1;
       else
         {