Commit e97b61c2 by Mikael Morin Committed by Mikael Morin

trans-array.c (gfc_trans_constant_array_constructor): Remove superfluous…

trans-array.c (gfc_trans_constant_array_constructor): Remove superfluous initialisation of DIM field.

2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>

	* trans-array.c (gfc_trans_constant_array_constructor): Remove
	superfluous initialisation of DIM field.
	(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
	(gfc_conv_expr_descriptor): Ditto.
	* trans-expr.c (gfc_conv_procedure_call): Ditto.

From-SVN: r178698
parent 26f77530
2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
* trans-array.c (gfc_trans_constant_array_constructor): Remove
superfluous initialisation of DIM field.
(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
(gfc_conv_expr_descriptor): Ditto.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
* trans-array.h (gfc_get_scalar_ss): New prototype.
* trans-array.c (gfc_get_scalar_ss): New function.
(gfc_walk_variable_expr, gfc_walk_op_expr,
......
......@@ -1882,7 +1882,6 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop,
info->start[i] = gfc_index_zero_node;
info->end[i] = gfc_index_zero_node;
info->stride[i] = gfc_index_one_node;
info->dim[i] = i;
}
if (info->dimen > loop->temp_dim)
......@@ -1961,7 +1960,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where)
first_len = true;
}
ss->data.info.dimen = loop->dimen;
gcc_assert (ss->data.info.dimen == loop->dimen);
c = ss->expr->value.constructor;
if (ss->expr->ts.type == BT_CHARACTER)
......@@ -5915,7 +5914,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
loop.dimen);
se->string_length = loop.temp_ss->string_length;
loop.temp_ss->data.temp.dimen = loop.dimen;
gcc_assert (loop.temp_ss->data.temp.dimen == loop.dimen);
loop.temp_ss->data.temp.codimen = loop.codimen;
gfc_add_ss_to_loop (&loop, loop.temp_ss);
}
......
......@@ -3576,7 +3576,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Set the type of the array. */
tmp = gfc_typenode_for_spec (&comp->ts);
info->dimen = se->loop->dimen;
gcc_assert (info->dimen == se->loop->dimen);
/* Evaluate the bounds of the result, if known. */
gfc_set_loop_bounds_from_array_spec (&mapping, se, comp->as);
......@@ -3611,7 +3611,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Set the type of the array. */
tmp = gfc_typenode_for_spec (&ts);
info->dimen = se->loop->dimen;
gcc_assert (info->dimen == se->loop->dimen);
/* Evaluate the bounds of the result, if known. */
gfc_set_loop_bounds_from_array_spec (&mapping, se, sym->result->as);
......
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