This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Fix PR 13201



Here's what I committed. I changed the check to "sym->as->type != AS_EXPLICIT", as this seems correct and caused no adverse effects. I also fixed an additional typo in the comment directly following.


- Tobi

Index: resolve.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/resolve.c,v
retrieving revision 1.4
diff -u -p -r1.4 resolve.c
--- resolve.c   18 May 2004 00:48:04 -0000      1.4
+++ resolve.c   9 Jun 2004 12:30:29 -0000
@@ -3736,14 +3736,22 @@ resolve_symbol (gfc_symbol * sym)
          || sym->as->type == AS_ASSUMED_SHAPE)
       && sym->attr.dummy == 0)
     {
-      gfc_error("Assumed %s array at %L must be a dummy argument",
-               sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape",
-                &sym->declared_at);
+      gfc_error ("Assumed %s array at %L must be a dummy argument",
+                sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape",
+                 &sym->declared_at);
+      return;
+    }
+
+  if (sym->attr.flavor == FL_PARAMETER
+      && sym->as != NULL && sym->as->type != AS_EXPLICIT)
+    {
+      gfc_error ("Parameter array '%s' at %L must have an explicit shape",
+                sym->name, &sym->declared_at);
       return;
     }

   /* Make sure that character string variables with assumed length are
-     dummy argument.  */
+     dummy arguments.  */

   if (sym->attr.flavor == FL_VARIABLE && !sym->attr.result
       && sym->ts.type == BT_CHARACTER


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]