aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2012-08-02 18:30:02 +0000
committerMikael Morin <mikael@gcc.gnu.org>2012-08-02 18:30:02 +0000
commit328ece7de3d6903fd6e2c909e1efe1eea59fc8ec (patch)
treef10adb4ae49ac21653756591623e2d9073bbf81f
parenta8da72b86c262f75d65665c3803a658d8089a679 (diff)
downloadgcc-328ece7de3d6903fd6e2c909e1efe1eea59fc8ec.zip
gcc-328ece7de3d6903fd6e2c909e1efe1eea59fc8ec.tar.gz
gcc-328ece7de3d6903fd6e2c909e1efe1eea59fc8ec.tar.bz2
array.c (gfc_copy_array_ref): Don't copy the offset field.
* 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
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/fortran/array.c2
-rw-r--r--gcc/fortran/expr.c7
-rw-r--r--gcc/fortran/gfortran.h2
-rw-r--r--gcc/fortran/trans-expr.c1
5 files changed, 10 insertions, 10 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5ed954a..979f28c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 76bd5c3..f23d0bc 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -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;
}
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 3a3ba9a..aeb224f 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -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++)
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 8fea23d..b6e2975 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -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;
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 263605a..2603995 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -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: