]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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 2421c03fe76d1f3cd6c7813cf0cd87f256f0da09..f8105b1b0e884cad1d3eff2db1049b1a731a65bb 100644 (file)
@@ -1,3 +1,9 @@
+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
index 4c5990e7ae162de65a9d20c80b1e1e673248b384..cb5f30e28e075f65d4fd05e292fd83eaf9877a43 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]);