aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-22 08:34:41 +0000
committerRichard Guenther <rguenther@suse.de>2010-04-22 08:34:41 +0000
commit1d986f67e71d5a851ef6b903e944a6b89e14f6d8 (patch)
tree3b644ac3468bdfc3f3d146ccfd9417222f96a056 /gcc/fortran/trans-array.c
parentf251e6ab3b50936cebb0555e78ccbcc28f577489 (diff)
2010-04-22 Richard Guenther <rguenther@suse.de>
PR fortran/43829 * resolve.c (gfc_resolve_index): Wrap around ... (gfc_resolve_index_1): ... this. Add parameter to allow any integer kind index type. (resolve_array_ref): Allow any integer kind for the start index of an array ref. * gfortran.dg/vector_subscript_6.f90: New testcase. * gfortran.dg/assign_10.f90: Adjust. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@158632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index b03cc9400c9..199eb23b6ac 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2434,6 +2434,7 @@ gfc_conv_array_index_offset (gfc_se * se, gfc_ss_info * info, int dim, int i,
gfc_conv_array_data (desc));
index = gfc_build_array_ref (data, index, NULL);
index = gfc_evaluate_now (index, &se->pre);
+ index = fold_convert (gfc_array_index_type, index);
/* Do any bounds checking on the final info->descriptor index. */
index = gfc_trans_array_bound_check (se, info->descriptor,