Commit 328ece7d by Mikael Morin

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
parent a8da72b8
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> 2012-08-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54147 PR fortran/54147
......
...@@ -50,8 +50,6 @@ gfc_copy_array_ref (gfc_array_ref *src) ...@@ -50,8 +50,6 @@ gfc_copy_array_ref (gfc_array_ref *src)
dest->stride[i] = gfc_copy_expr (src->stride[i]); dest->stride[i] = gfc_copy_expr (src->stride[i]);
} }
dest->offset = gfc_copy_expr (src->offset);
return dest; return dest;
} }
......
...@@ -1493,9 +1493,6 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) ...@@ -1493,9 +1493,6 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
constructor. */ constructor. */
for (idx = 0; idx < (int) mpz_get_si (nelts); idx++) 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; incr_ctr = true;
......
...@@ -1515,8 +1515,6 @@ typedef struct gfc_array_ref ...@@ -1515,8 +1515,6 @@ typedef struct gfc_array_ref
*stride[GFC_MAX_DIMENSIONS]; *stride[GFC_MAX_DIMENSIONS];
enum gfc_array_ref_dimen_type dimen_type[GFC_MAX_DIMENSIONS]; enum gfc_array_ref_dimen_type dimen_type[GFC_MAX_DIMENSIONS];
struct gfc_expr *offset;
} }
gfc_array_ref; gfc_array_ref;
......
...@@ -2806,7 +2806,6 @@ gfc_apply_interface_mapping_to_ref (gfc_interface_mapping * mapping, ...@@ -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.end[n]);
gfc_apply_interface_mapping_to_expr (mapping, ref->u.ar.stride[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; break;
case REF_COMPONENT: case REF_COMPONENT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment