]> gcc.gnu.org Git - gcc.git/commitdiff
array.c (gfc_copy_array_ref): Don't copy the offset field.
authorMikael Morin <mikael@gcc.gnu.org>
Thu, 2 Aug 2012 18:30:02 +0000 (18:30 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Thu, 2 Aug 2012 18:30:02 +0000 (18:30 +0000)
* array.c (gfc_copy_array_ref): Don't copy the offset field.
* expr.c (find_array_section): Ignore the offset field.
* trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
any interface mapping to the offset field.
* gfortran.h (struct gfc_array_ref): Remove the offset field.

From-SVN: r190092

gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/trans-expr.c

index 5ed954a7745ac55c999da6405d4c4264094988fc..979f28cb985f951b0164502a89cd2c9dbd61d17f 100644 (file)
@@ -1,3 +1,11 @@
+2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
+
+       * array.c (gfc_copy_array_ref): Don't copy the offset field.
+       * expr.c (find_array_section): Ignore the offset field.
+       * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
+       any interface mapping to the offset field.
+       * gfortran.h (struct gfc_array_ref): Remove the offset field.
+
 2012-08-02  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/54147
index 76bd5c3d63ddc774e8b79097160fe78653f28a0c..f23d0bc7888cfb3fd0d82b16027adb1448bbd257 100644 (file)
@@ -50,8 +50,6 @@ gfc_copy_array_ref (gfc_array_ref *src)
       dest->stride[i] = gfc_copy_expr (src->stride[i]);
     }
 
-  dest->offset = gfc_copy_expr (src->offset);
-
   return dest;
 }
 
index 3a3ba9a9132b2b5e4bbe8c81cd1d55f85649a284..aeb224f176776397fb7f54bfbb82489ef657b391 100644 (file)
@@ -1490,13 +1490,10 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
 
   /* Now clock through the array reference, calculating the index in
      the source constructor and transferring the elements to the new
-     constructor.  */  
+     constructor.  */
   for (idx = 0; idx < (int) mpz_get_si (nelts); idx++)
     {
-      if (ref->u.ar.offset)
-       mpz_set (ptr, ref->u.ar.offset->value.integer);
-      else
-       mpz_init_set_ui (ptr, 0);
+      mpz_init_set_ui (ptr, 0);
 
       incr_ctr = true;
       for (d = 0; d < rank; d++)
index 8fea23da1c3b1972f1474f2b84d483c4aa86b288..b6e29758cf1dcddf76d226efad545b2ab171ff2b 100644 (file)
@@ -1515,8 +1515,6 @@ typedef struct gfc_array_ref
     *stride[GFC_MAX_DIMENSIONS];
 
   enum gfc_array_ref_dimen_type dimen_type[GFC_MAX_DIMENSIONS];
-
-  struct gfc_expr *offset;
 }
 gfc_array_ref;
 
index 263605aa721998a64607941568553bd733d3fc3c..2603995aff08767e5d4e5346c86e886d3c295e00 100644 (file)
@@ -2806,7 +2806,6 @@ gfc_apply_interface_mapping_to_ref (gfc_interface_mapping * mapping,
            gfc_apply_interface_mapping_to_expr (mapping, ref->u.ar.end[n]);
            gfc_apply_interface_mapping_to_expr (mapping, ref->u.ar.stride[n]);
          }
-       gfc_apply_interface_mapping_to_expr (mapping, ref->u.ar.offset);
        break;
 
       case REF_COMPONENT:
This page took 0.085138 seconds and 5 git commands to generate.