]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 14:12:08 +0000 (14:12 +0000)
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 14:12:08 +0000 (14:12 +0000)
* trans-array.c (gfc_set_loop_bounds_from_array_spec):
Get the array dimension from the dim array.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164109 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 2483ad9bea722bdbd0c544b1ebbd3d028f738153..6525253fe5440b7c52567f3a7efeadbcaecfb6d3 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
+
+       * trans-array.c (gfc_set_loop_bounds_from_array_spec):
+       Get the array dimension from the dim array.
+
 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
 
        * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
index e0bc34fe3b0290291b804d07544c0ae7bf99a70b..a5da47412305dbce3a37b4f1ea108dd09b5bb420 100644 (file)
@@ -562,9 +562,11 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping,
   tree tmp;
 
   if (as && as->type == AS_EXPLICIT)
-    for (dim = 0; dim < se->loop->dimen; dim++)
+    for (n = 0; n < se->loop->dimen; n++)
       {
-       n = se->loop->order[dim];
+       dim = se->ss->data.info.dim[n];
+       gcc_assert (dim < as->rank);
+       gcc_assert (se->loop->dimen == as->rank);
        if (se->loop->to[n] == NULL_TREE)
          {
            /* Evaluate the lower bound.  */