[Bug middle-end/35136] [4.3 Regression] ICE caused by address calculation with loop variable when optimization is on

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 12 09:09:00 GMT 2008



------- Comment #9 from ebotcazou at gcc dot gnu dot org  2008-02-12 09:08 -------
> But maybe the problem is the discrepancy between force_gimple_operand and
> force_gimple_operand_bsi: why does the latter preserve the SSA form and not
> the former?

This would fix the problem:

Index: gimplify.c
===================================================================
--- gimplify.c  (revision 132243)
+++ gimplify.c  (working copy)
@@ -6629,6 +6629,14 @@ force_gimple_operand (tree expr, tree *s

   pop_gimplify_context (NULL);

+  if (*stmts && gimple_in_ssa_p (cfun))
+    {
+      tree_stmt_iterator tsi;
+
+      for (tsi = tsi_start (*stmts); !tsi_end_p (tsi); tsi_next (&tsi))
+       mark_symbols_for_renaming (tsi_stmt (tsi));
+    }
+
   return expr;
 }

@@ -6648,14 +6656,6 @@ force_gimple_operand_bsi (block_stmt_ite
   expr = force_gimple_operand (expr, &stmts, simple_p, var);
   if (stmts)
     {
-      if (gimple_in_ssa_p (cfun))
-       {
-         tree_stmt_iterator tsi;
-
-         for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
-           mark_symbols_for_renaming (tsi_stmt (tsi));
-       }
-
       if (before)
        bsi_insert_before (bsi, stmts, m);
       else


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35136



More information about the Gcc-bugs mailing list