diff options
author | Mikael Morin <mikael.morin@sfr.fr> | 2011-10-07 21:33:10 +0200 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2011-10-07 19:33:10 +0000 |
commit | 3ca398580df5bc111e2427922c5c088f693914d3 (patch) | |
tree | 392620842571bb3c22c92bf50c02e1c782ba7731 /gcc/fortran/trans-array.c | |
parent | a7525708c6aab59583d3ddb59d75624a8ccd8a8f (diff) | |
download | gcc-3ca398580df5bc111e2427922c5c088f693914d3.zip gcc-3ca398580df5bc111e2427922c5c088f693914d3.tar.gz gcc-3ca398580df5bc111e2427922c5c088f693914d3.tar.bz2 |
trans-array.c (gfc_conv_section_startstride): Factor common array ref references.
* trans-array.c (gfc_conv_section_startstride): Factor common
array ref references.
From-SVN: r179679
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 0f5f29c..7cc86ba 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3187,12 +3187,14 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim, tree desc; gfc_se se; gfc_ss_info *info; + gfc_array_ref *ar; gcc_assert (ss->type == GFC_SS_SECTION); info = &ss->data.info; + ar = &info->ref->u.ar; - if (info->ref->u.ar.dimen_type[dim] == DIMEN_VECTOR) + if (ar->dimen_type[dim] == DIMEN_VECTOR) { /* We use a zero-based index to access the vector. */ info->start[dim] = gfc_index_zero_node; @@ -3202,12 +3204,12 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim, return; } - gcc_assert (info->ref->u.ar.dimen_type[dim] == DIMEN_RANGE); + gcc_assert (ar->dimen_type[dim] == DIMEN_RANGE); desc = info->descriptor; - start = info->ref->u.ar.start[dim]; - end = info->ref->u.ar.end[dim]; + start = ar->start[dim]; + end = ar->end[dim]; if (!coarray) - stride = info->ref->u.ar.stride[dim]; + stride = ar->stride[dim]; /* Calculate the start of the range. For vector subscripts this will be the range of the vector. */ |