]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans.h (struct gfc_ss): New field nested_ss.
authorMikael Morin <mikael@gcc.gnu.org>
Thu, 3 Nov 2011 23:31:32 +0000 (23:31 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Thu, 3 Nov 2011 23:31:32 +0000 (23:31 +0000)
* trans.h (struct gfc_ss): New field nested_ss.
* trans-expr.c (gfc_advance_se_ss_chain): Update assertion.

From-SVN: r180893

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans.h

index 47c4938f8e0416f9643b24339558cdc779ce589e..92be1535b9eb7a26fdf79a5a0eae7584e532f5c8 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 72d35f8de8946bc7c19dbbe6bc80b96ad6227ffd..4cfdc3e09067a5d0ee715db0e5b87f6efed791c1 100644 (file)
@@ -92,7 +92,8 @@ gfc_advance_se_ss_chain (gfc_se * se)
   while (p != NULL)
     {
       /* 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
         on the parent ss' next pointer.  Thus we should not take the next
index 53c5ce25fa4bc700ccd06c02bf9181ba4b17fe4d..06088797f64fbfd27f0e548b47b5ac0e90cfc803 100644 (file)
@@ -249,6 +249,11 @@ typedef struct gfc_ss
   /* Non-null if the ss is part of a nested loop.  */
   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.  */
   struct gfc_loopinfo *loop;