re PR fortran/66041 (Matmul ICE)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 12 May 2015 06:37:43 +0000 (06:37 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 12 May 2015 06:37:43 +0000 (06:37 +0000)
2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/66041
PR fortran/37131
* gfortran.h (gfc_array_spec):  Add field resolved.
* array.c (gfc_resolve_array_spec):  Resolve array spec
only once.

From-SVN: r223031

gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/gfortran.h

index fb6824513aa962c311ee96852ba9194cb768af87..174e3b485695e30de611cb49b32f8ba48bd3ef8a 100644 (file)
@@ -1,3 +1,11 @@
+2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/66041
+       PR fortran/37131
+       * gfortran.h (gfc_array_spec):  Add field resolved.
+       * array.c (gfc_resolve_array_spec):  Resolve array spec
+       only once.
+
 2015-05-11  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/66100
index 64d0abf8fa448e23e7986a8720a4c4cef419a9d8..1ab3cd0f34ce0e09221c25baf72af9c490bdbb40 100644 (file)
@@ -338,6 +338,9 @@ gfc_resolve_array_spec (gfc_array_spec *as, int check_constant)
   if (as == NULL)
     return true;
 
+  if (as->resolved)
+    return true;
+
   for (i = 0; i < as->rank + as->corank; i++)
     {
       e = as->lower[i];
@@ -364,6 +367,8 @@ gfc_resolve_array_spec (gfc_array_spec *as, int check_constant)
        }
     }
 
+  as->resolved = true;
+
   return true;
 }
 
index 6c54da87182e20dd1d0b80766019df1785bd7549..514e93f69b01b8406a6da242f8e5ad48172f242a 100644 (file)
@@ -1002,6 +1002,8 @@ typedef struct
   bool cp_was_assumed; /* AS_ASSUMED_SIZE cp arrays are converted to
                        AS_EXPLICIT, but we want to remember that we
                        did this.  */
+
+  bool resolved;
 }
 gfc_array_spec;