Commit f49afcb0 by Mikael Morin

trans-array.c (set_vector_loop_bounds): Loop over the parents.

	* trans-array.c (set_vector_loop_bounds): Loop over the parents.

From-SVN: r180892
parent fa168d9f
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (set_vector_loop_bounds): Loop over the parents.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_trans_array_constructor): Loop over the parents.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
......
......@@ -2197,14 +2197,18 @@ set_vector_loop_bounds (gfc_ss * ss)
int dim;
info = &ss->info->data.array;
loop = ss->loop;
for (n = 0; n < loop->dimen; n++)
for (; ss; ss = ss->parent)
{
dim = ss->dim[n];
if (info->ref->u.ar.dimen_type[dim] == DIMEN_VECTOR
&& loop->to[n] == NULL)
loop = ss->loop;
for (n = 0; n < loop->dimen; n++)
{
dim = ss->dim[n];
if (info->ref->u.ar.dimen_type[dim] != DIMEN_VECTOR
|| loop->to[n] != NULL)
continue;
/* Loop variable N indexes vector dimension DIM, and we don't
yet know the upper bound of loop variable N. Set it to the
difference between the vector's upper and lower bounds. */
......
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