Commit c2558afc by Mikael Morin

trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization earlier.

	* trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
	earlier.

From-SVN: r180140
parent 33aa08b3
2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
earlier.
2011-10-18 Janus Weil <janus@gcc.gnu.org> 2011-10-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/47023 PR fortran/47023
......
...@@ -5974,6 +5974,8 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) ...@@ -5974,6 +5974,8 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
tree to; tree to;
tree base; tree base;
ndim = info->ref ? info->ref->u.ar.dimen : info->dimen;
if (se->want_coarray) if (se->want_coarray)
{ {
codim = gfc_get_corank (expr); codim = gfc_get_corank (expr);
...@@ -6046,7 +6048,6 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) ...@@ -6046,7 +6048,6 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
else else
base = NULL_TREE; base = NULL_TREE;
ndim = info->ref ? info->ref->u.ar.dimen : info->dimen;
for (n = 0; n < ndim; n++) for (n = 0; n < ndim; n++)
{ {
stride = gfc_conv_array_stride (desc, n); stride = gfc_conv_array_stride (desc, n);
......
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