Commit 96b2ffe1 by Mikael Morin

trans-array.c (set_loop_bounds): Remove useless dimension check.

	* trans-array.c (set_loop_bounds): Remove useless dimension check.
	Don't update loopspec if it would loose the wanted stride criterion.

From-SVN: r190096
parent 17aa6ab6
2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (set_loop_bounds): Remove useless dimension check.
Don't update loopspec if it would loose the wanted stride criterion.
2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.h (gfc_conv_descriptor_rank): New prototype.
* trans-array.c (gfc_conv_descriptor_rank): New function moved and
renamed ...
......
......@@ -4469,8 +4469,7 @@ set_loop_bounds (gfc_loopinfo *loop)
known lower bound
known upper bound
*/
else if ((loopspec[n]->info->type == GFC_SS_CONSTRUCTOR && dynamic[n])
|| n >= loop->dimen)
else if (loopspec[n]->info->type == GFC_SS_CONSTRUCTOR && dynamic[n])
loopspec[n] = ss;
else if (integer_onep (info->stride[dim])
&& !integer_onep (specinfo->stride[spec_dim]))
......@@ -4479,7 +4478,11 @@ set_loop_bounds (gfc_loopinfo *loop)
&& !INTEGER_CST_P (specinfo->stride[spec_dim]))
loopspec[n] = ss;
else if (INTEGER_CST_P (info->start[dim])
&& !INTEGER_CST_P (specinfo->start[spec_dim]))
&& !INTEGER_CST_P (specinfo->start[spec_dim])
&& integer_onep (info->stride[dim])
== integer_onep (specinfo->stride[dim])
&& INTEGER_CST_P (info->stride[dim])
== INTEGER_CST_P (specinfo->stride[dim]))
loopspec[n] = ss;
/* We don't work out the upper bound.
else if (INTEGER_CST_P (info->finish[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