]> 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 14:45:46 +0000 (14:45 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Tue, 18 Oct 2011 14:45:46 +0000 (14:45 +0000)
PR fortran/50420
* trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
ndim for the descriptor's rank.

From-SVN: r180143

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

index 06a65a4b475d7f0277e044d0451584316c3cfe63..1cea460f3dbaed4e3821672450a57f14194d9299 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/50420
+       * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
+       ndim for the descriptor's rank.
+
 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/50420
index 0da1720c40b1c1325903937463fdbe78571a30e0..06a81f1db71b66bbb052bdbb66a144fdfcddc8ad 100644 (file)
@@ -6150,13 +6150,13 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
                                          gfc_rank_cst[dim], stride);
        }
 
-      for (n = ndim; n < ndim + codim; n++)
+      for (n = loop.dimen; n < loop.dimen + codim; n++)
        {
          from = loop.from[n];
          to = loop.to[n];
          gfc_conv_descriptor_lbound_set (&loop.pre, parm,
                                          gfc_rank_cst[n], from);
-         if (n < ndim + codim - 1)
+         if (n < loop.dimen + codim - 1)
            gfc_conv_descriptor_ubound_set (&loop.pre, parm,
                                            gfc_rank_cst[n], to);
        }