OSDN Git Service

2008-10-08 Jerry DeLisle <jvdelisle@gcc.gnu.org
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2008 04:02:35 +0000 (04:02 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2008 04:02:35 +0000 (04:02 +0000)
PR libfortran/37707
* io/list_read.c (nml_get_obj_data): If the first namelist object rank
is greater than zero, call nml_object_read with the first object rather
than the sub-object.

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

libgfortran/ChangeLog
libgfortran/io/list_read.c

index 1130bdf..4e11595 100644 (file)
@@ -1,3 +1,10 @@
+2008-10-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org
+
+       PR libfortran/37707
+       * io/list_read.c (nml_get_obj_data): If the first namelist object rank is
+       greater than zero, call nml_object_read with the first object rather
+       than the sub-object.
+
 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
             Steve Ellcey  <sje@cup.hp.com>
 
index bcde3e1..76634a3 100644 (file)
@@ -2839,6 +2839,9 @@ get_name:
       goto nml_err_ret;
     }
 
+  if (first_nl != NULL && first_nl->var_rank > 0)
+    nl = first_nl;
+  
   if (nml_read_obj (dtp, nl, 0, pprev_nl, nml_err_msg, nml_err_msg_size,
                    clow, chigh) == FAILURE)
     goto nml_err_ret;