diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 1130bdf602ce126f3f6702abb545cd09060c2cb4..4e115957144fbe87dbeb6450cd401142f768bffc 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -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>
 
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index bcde3e1d49b4f50cdfb3d76c631aef05a82bf957..76634a3ee25ce56f8b465a8fb4f996dadaa1c90c 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -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;