diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2013-08-23 16:06:44 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2013-08-23 16:06:44 +0000 |
commit | cf66452262a257dc3591df9b762f2b2b9162067f (patch) | |
tree | 284a56059231a897a6f3e258187a38e5fc4f50f7 /gcc/fortran | |
parent | 64cbf23d1f42c3ac9e545077868c6b669c1b5b5c (diff) | |
download | gcc-cf66452262a257dc3591df9b762f2b2b9162067f.zip gcc-cf66452262a257dc3591df9b762f2b2b9162067f.tar.gz gcc-cf66452262a257dc3591df9b762f2b2b9162067f.tar.bz2 |
trans-array.c (gfc_conv_section_startstride): Move &loop->pre access to the callers.
2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
to the callers.
(gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
From-SVN: r201945
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 16 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7bf8099..122f6c6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2013-08-23 Mikael Morin <mikael@gcc.gnu.org> + + * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access + to the callers. + (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers. + 2013-08-22 Janus Weil <janus@gcc.gnu.org> PR fortran/58185 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 1a2e508..a626d66 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3715,7 +3715,7 @@ evaluate_bound (stmtblock_t *block, tree *bounds, gfc_expr ** values, /* Calculate the lower bound of an array section. */ static void -gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim) +gfc_conv_section_startstride (stmtblock_t * block, gfc_ss * ss, int dim) { gfc_expr *stride = NULL; tree desc; @@ -3744,12 +3744,12 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim) /* Calculate the start of the range. For vector subscripts this will be the range of the vector. */ - evaluate_bound (&loop->pre, info->start, ar->start, desc, dim, true); + evaluate_bound (block, info->start, ar->start, desc, dim, true); /* Similarly calculate the end. Although this is not used in the scalarizer, it is needed when checking bounds and where the end is an expression with side-effects. */ - evaluate_bound (&loop->pre, info->end, ar->end, desc, dim, false); + evaluate_bound (block, info->end, ar->end, desc, dim, false); /* Calculate the stride. */ if (stride == NULL) @@ -3758,8 +3758,8 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim) { gfc_init_se (&se, NULL); gfc_conv_expr_type (&se, stride, gfc_array_index_type); - gfc_add_block_to_block (&loop->pre, &se.pre); - info->stride[dim] = gfc_evaluate_now (se.expr, &loop->pre); + gfc_add_block_to_block (block, &se.pre); + info->stride[dim] = gfc_evaluate_now (se.expr, block); } } @@ -3838,7 +3838,7 @@ done: gfc_conv_ss_descriptor (&loop->pre, ss, !loop->array_parameter); for (n = 0; n < ss->dimen; n++) - gfc_conv_section_startstride (loop, ss, ss->dim[n]); + gfc_conv_section_startstride (&loop->pre, ss, ss->dim[n]); break; case GFC_SS_INTRINSIC: @@ -6727,10 +6727,10 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr) gcc_assert (ar->dimen_type[n + ndim] == DIMEN_THIS_IMAGE); /* Make sure the call to gfc_conv_section_startstride won't - generate unnecessary code to calculate stride. */ + generate unnecessary code to calculate stride. */ gcc_assert (ar->stride[n + ndim] == NULL); - gfc_conv_section_startstride (&loop, ss, n + ndim); + gfc_conv_section_startstride (&loop.pre, ss, n + ndim); loop.from[n + loop.dimen] = info->start[n + ndim]; loop.to[n + loop.dimen] = info->end[n + ndim]; } |