------- Comment #2 from burnus at gcc dot gnu dot org  2007-07-24 13:49 -------
Index: resolve.c
===================================================================
--- resolve.c   (revision 126873)
+++ resolve.c   (working copy)
@@ -7040,6 +7044,13 @@ resolve_fl_namelist (gfc_symbol *sym)
   /* Reject namelist arrays that are not constant shape.  */
   for (nl = sym->namelist; nl; nl = nl->next)
     {
+      if (nl->sym->as->type != AS_EXPLICIT)
+       {
+         gfc_error ("Variable '%s' at %L must have an explicit shape to "
+                    "be in a NAMELIST", nl->sym->name, &sym->declared_at);
+         return FAILURE;
+       }
+
       if (is_non_constant_shape_array (nl->sym))
        {
          gfc_error ("The array '%s' must have constant shape to be "


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31818

Reply via email to