]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/40853 (I/O: Namelist read error)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 2 Aug 2009 18:31:07 +0000 (18:31 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 2 Aug 2009 18:31:07 +0000 (18:31 +0000)
2009-08-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libfortran/40853
* io/list_read.c (nml_get_obj_data): Do not set nl
pointer to first_nl if nl->next is NULL.

From-SVN: r150356

libgfortran/ChangeLog
libgfortran/io/list_read.c

index e8efb647c4b7cabc6b120d4b22dd99b59fb142f7..846bdfb173822a4400b6624c109d0cd540b96177 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/40853
+       * io/list_read.c (nml_get_obj_data): Do not set nl
+       pointer to first_nl if nl->next is NULL.
+
 2009-07-31  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * Makefile.am: Don't set SECTION_FLAGS with @SECTION_FLAGS@.
index c39a51d34e23a27a9e4f4d0f12333063c08a7c43..bcc00e17c26f82ecb5e864c79b2a2690e027f956 100644 (file)
@@ -2773,7 +2773,7 @@ get_name:
 
   if (nl->type == GFC_DTYPE_DERIVED)
     nml_touch_nodes (nl);
-  if (component_flag && nl->var_rank > 0)
+  if (component_flag && nl->var_rank > 0 && nl->next)
     nl = first_nl;
 
   /* Make sure no extraneous qualifiers are there.  */