re PR fortran/50420 ([Coarray] lcobound doesn't accept coarray subcomponents)
authorMikael Morin <mikael@gcc.gnu.org>
Tue, 18 Oct 2011 15:13:45 +0000 (15:13 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Tue, 18 Oct 2011 15:13:45 +0000 (15:13 +0000)
PR fortran/50420
* trans-types.c (gfc_build_array_type): Don't force lower bound to one
in the deferred case.

From-SVN: r180151

gcc/fortran/ChangeLog
gcc/fortran/trans-types.c

index 2421c03..f8105b1 100644 (file)
@@ -1,6 +1,12 @@
 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/50420
+       * trans-types.c (gfc_build_array_type): Don't force lower bound to one
+       in the deferred case.
+
+2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/50420
        * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
        Don't set already set array ref.
 
index 4c5990e..cb5f30e 100644 (file)
@@ -1254,7 +1254,7 @@ gfc_build_array_type (tree type, gfc_array_spec * as,
 
   for (n = as->rank; n < as->rank + as->corank; n++)
     {
-      if (as->lower[n] == NULL)
+      if (as->type != AS_DEFERRED && as->lower[n] == NULL)
         lbound[n] = gfc_index_one_node;
       else
         lbound[n] = gfc_conv_array_bound (as->lower[n]);