Commit 4d6a0e36 by Mikael Morin

trans.h (struct gfc_ss): New field nested_ss.

	* trans.h (struct gfc_ss): New field nested_ss.
	* trans-expr.c (gfc_advance_se_ss_chain): Update assertion.

From-SVN: r180893
parent f49afcb0
2011-11-03 Mikael Morin <mikael@gcc.gnu.org> 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans.h (struct gfc_ss): New field nested_ss.
* trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (set_vector_loop_bounds): Loop over the parents. * trans-array.c (set_vector_loop_bounds): Loop over the parents.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org> 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
......
...@@ -92,7 +92,8 @@ gfc_advance_se_ss_chain (gfc_se * se) ...@@ -92,7 +92,8 @@ gfc_advance_se_ss_chain (gfc_se * se)
while (p != NULL) while (p != NULL)
{ {
/* Simple consistency check. */ /* Simple consistency check. */
gcc_assert (p->parent == NULL || p->parent->ss == p->ss); gcc_assert (p->parent == NULL || p->parent->ss == p->ss
|| p->parent->ss->nested_ss == p->ss);
/* If we were in a nested loop, the next scalarized expression can be /* If we were in a nested loop, the next scalarized expression can be
on the parent ss' next pointer. Thus we should not take the next on the parent ss' next pointer. Thus we should not take the next
......
...@@ -249,6 +249,11 @@ typedef struct gfc_ss ...@@ -249,6 +249,11 @@ typedef struct gfc_ss
/* Non-null if the ss is part of a nested loop. */ /* Non-null if the ss is part of a nested loop. */
struct gfc_ss *parent; struct gfc_ss *parent;
/* If the evaluation of an expression requires a nested loop (for example
if the sum intrinsic is evaluated inline), this points to the nested
loop's gfc_ss. */
struct gfc_ss *nested_ss;
/* The loop this gfc_ss is in. */ /* The loop this gfc_ss is in. */
struct gfc_loopinfo *loop; struct gfc_loopinfo *loop;
......
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