]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/34676 (IO error delayed)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 5 Jan 2008 16:00:40 +0000 (16:00 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 5 Jan 2008 16:00:40 +0000 (16:00 +0000)
2008-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libfortran/34676
* io/list_read.c (next_char): Only save the EOF condition for later if
advance="no".

From-SVN: r131337

libgfortran/ChangeLog
libgfortran/io/list_read.c

index c15f5d5505071d5806f6ea8545a4bd85bd6522ff..2d276f63a2c7e61b23d12cf13ef68c9cfd83d8bb 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/34676
+       * io/list_read.c (next_char): Only save the EOF condition for later if
+       advance="no".
+
 2008-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR libfortran/34565
index f00fb77394b7e323d62188b0d6eee56086436bee..f1d0e6961e1f18fcf21c276e3b83d84f4051f841 100644 (file)
@@ -236,10 +236,15 @@ next_char (st_parameter_dt *dtp)
        }
       if (length == 0)
        {
-         if (dtp->u.p.current_unit->endfile == AT_ENDFILE)
+         if (dtp->u.p.advance_status == ADVANCE_NO)
+           {
+             if (dtp->u.p.current_unit->endfile == AT_ENDFILE)
+               longjmp (*dtp->u.p.eof_jump, 1);
+             dtp->u.p.current_unit->endfile = AT_ENDFILE;
+             c = '\n';
+           }
+         else
            longjmp (*dtp->u.p.eof_jump, 1);
-         dtp->u.p.current_unit->endfile = AT_ENDFILE;
-         c = '\n';
        }
       else
        c = *p;