re PR fortran/36582 (Namelist I/O error: Bogus "Cannot match namelist object")
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 23 Jul 2008 04:29:15 +0000 (04:29 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 23 Jul 2008 04:29:15 +0000 (04:29 +0000)
2008-07-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/36852
* io/list_read.c: If variable rank is zero, do not adjust the found
namelist object pointer.

From-SVN: r138072

libgfortran/ChangeLog
libgfortran/io/list_read.c

index cf5591095443c59016a89e940caeebaaeb83f8b9..2459b539096fe921cf141545f0b60294660abdb9 100644 (file)
@@ -1,3 +1,9 @@
+2008-07-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/36852
+       * io/list_read.c: If variable rank is zero, do not adjust the found
+       namelist object pointer.
+
 2008-07-22  Daniel Kraft  <d@domob.eu>
 
        PR fortran/29835
index ba8de9750e1e35367116b7ff64bb4405640ff5dc..34e2ac0698a7a74f09d485da4aa4d67a4fa84fa5 100644 (file)
@@ -2791,7 +2791,7 @@ get_name:
 
   if (nl->type == GFC_DTYPE_DERIVED)
     nml_touch_nodes (nl);
-  if (component_flag)
+  if (component_flag && nl->var_rank > 0)
     nl = first_nl;
 
   /* Make sure no extraneous qualifiers are there.  */