re PR libfortran/31052 ([4.2 only] Bad IOSTAT values when readings NAMELISTs past...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 28 Mar 2007 00:19:39 +0000 (00:19 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 28 Mar 2007 00:19:39 +0000 (00:19 +0000)
2007-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/31052
* io/transfer.c (next_record_r): Do not call test_endfile if in namelist
mode.

From-SVN: r123284

libgfortran/ChangeLog
libgfortran/io/transfer.c

index c3425893e00981d410be4e6220967756cc585f43..4dbc337a2d3aba5329e769102614321d18a92287 100644 (file)
@@ -1,9 +1,15 @@
+2007-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/31052
+       * io/transfer.c (next_record_r): Do not call test_endfile if in namelist
+       mode.
+
 2007-03-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/31199
-       *io/io.h: Add saved_pos to gfc_unit structure.
-       *io/open.c (new_unit): Initialize saved_pos.
-       *io/transfer.c (data_transfer_init): Set max_pos to value in saved_pos.
+       * io/io.h: Add saved_pos to gfc_unit structure.
+       * io/open.c (new_unit): Initialize saved_pos.
+       * io/transfer.c (data_transfer_init): Set max_pos to value in saved_pos.
        (next_record_w): Fix whitespace.
        (finalze_transfer): Calculate max_pos for ADVANCE="no" and save it for
        later use.  If not ADVANCE="no" set saved_pos to zero.
index 94bda09587bf7058b4c178da253df284608e464d..2555898e11270ca79ddcb1f7b9f1ae1215e75d6d 100644 (file)
@@ -2228,7 +2228,8 @@ next_record_r (st_parameter_dt *dtp)
       break;
     }
 
-  if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL)
+  if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL
+      && !dtp->u.p.namelist_mode)
     test_endfile (dtp->u.p.current_unit);
 }