OSDN Git Service

2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2010 20:28:09 +0000 (20:28 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2010 20:28:09 +0000 (20:28 +0000)
PR libfortran/45108
* io/list_read.c (namelist_read): If namelist reading fails, use
generate_error and then continue the read loop.

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

libgfortran/ChangeLog
libgfortran/io/list_read.c

index b0a9c05..3ffb788 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/45108
+       * io/list_read.c (namelist_read): If namelist reading fails, use
+       generate_error and then continue the read loop.
+
 2010-08-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/45308
index c88edf6..d757b1c 100644 (file)
@@ -2959,21 +2959,11 @@ find_nml_name:
       if (nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg)
                            == FAILURE)
        {
-         gfc_unit *u;
-
          if (dtp->u.p.current_unit->unit_number != options.stdin_unit)
            goto nml_err_ret;
-
-         u = find_unit (options.stderr_unit);
-         st_printf ("%s\n", nml_err_msg);
-         if (u != NULL)
-           {
-             sflush (u->s);
-             unlock_unit (u);
-           }
+         generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);
         }
-
-   }
+    }
 
   dtp->u.p.eof_jump = NULL;
   free_saved (dtp);