From: Thomas Koenig Date: Tue, 12 May 2015 06:37:43 +0000 (+0000) Subject: re PR fortran/66041 (Matmul ICE) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b7df66f80888ba9f47853af080ead6f4422cddb;p=gcc.git re PR fortran/66041 (Matmul ICE) 2015-05-12 Thomas Koenig 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fb6824513aa..174e3b48569 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2015-05-12 Thomas Koenig + + 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 PR fortran/66100 diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 64d0abf8fa4..1ab3cd0f34c 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -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; } diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 6c54da87182..514e93f69b0 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -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;