From: Mikael Morin Date: Tue, 18 Oct 2011 14:45:46 +0000 (+0000) Subject: re PR fortran/50420 ([Coarray] lcobound doesn't accept coarray subcomponents) X-Git-Tag: releases/gcc-4.7.0~3009 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=700535b75f0df9aa1cabe95da1fcf3df82ad1c01;p=thirdparty%2Fgcc.git re PR fortran/50420 ([Coarray] lcobound doesn't accept coarray subcomponents) PR fortran/50420 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of ndim for the descriptor's rank. From-SVN: r180143 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 06a65a4b475d..1cea460f3dba 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-10-18 Mikael Morin + + PR fortran/50420 + * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of + ndim for the descriptor's rank. + 2011-10-18 Mikael Morin PR fortran/50420 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 0da1720c40b1..06a81f1db71b 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -6150,13 +6150,13 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) gfc_rank_cst[dim], stride); } - for (n = ndim; n < ndim + codim; n++) + for (n = loop.dimen; n < loop.dimen + codim; n++) { from = loop.from[n]; to = loop.to[n]; gfc_conv_descriptor_lbound_set (&loop.pre, parm, gfc_rank_cst[n], from); - if (n < ndim + codim - 1) + if (n < loop.dimen + codim - 1) gfc_conv_descriptor_ubound_set (&loop.pre, parm, gfc_rank_cst[n], to); }