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> 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.h (gfc_get_scalar_ss): New prototype.
* trans-array.c (gfc_get_scalar_ss): New function. * trans-array.c (gfc_get_scalar_ss): New function.
(gfc_walk_variable_expr, gfc_walk_op_expr, (gfc_walk_variable_expr, gfc_walk_op_expr,
......
...@@ -1882,7 +1882,6 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop, ...@@ -1882,7 +1882,6 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop,
info->start[i] = gfc_index_zero_node; info->start[i] = gfc_index_zero_node;
info->end[i] = gfc_index_zero_node; info->end[i] = gfc_index_zero_node;
info->stride[i] = gfc_index_one_node; info->stride[i] = gfc_index_one_node;
info->dim[i] = i;
} }
if (info->dimen > loop->temp_dim) if (info->dimen > loop->temp_dim)
...@@ -1961,7 +1960,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where) ...@@ -1961,7 +1960,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where)
first_len = true; first_len = true;
} }
ss->data.info.dimen = loop->dimen; gcc_assert (ss->data.info.dimen == loop->dimen);
c = ss->expr->value.constructor; c = ss->expr->value.constructor;
if (ss->expr->ts.type == BT_CHARACTER) if (ss->expr->ts.type == BT_CHARACTER)
...@@ -5915,7 +5914,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) ...@@ -5915,7 +5914,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
loop.dimen); loop.dimen);
se->string_length = loop.temp_ss->string_length; 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; loop.temp_ss->data.temp.codimen = loop.codimen;
gfc_add_ss_to_loop (&loop, loop.temp_ss); gfc_add_ss_to_loop (&loop, loop.temp_ss);
} }
......
...@@ -3576,7 +3576,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, ...@@ -3576,7 +3576,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Set the type of the array. */ /* Set the type of the array. */
tmp = gfc_typenode_for_spec (&comp->ts); 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. */ /* Evaluate the bounds of the result, if known. */
gfc_set_loop_bounds_from_array_spec (&mapping, se, comp->as); 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, ...@@ -3611,7 +3611,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Set the type of the array. */ /* Set the type of the array. */
tmp = gfc_typenode_for_spec (&ts); 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. */ /* Evaluate the bounds of the result, if known. */
gfc_set_loop_bounds_from_array_spec (&mapping, se, sym->result->as); 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