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

--- Comment #1 from vries at gcc dot gnu.org 2012-01-18 05:41:34 UTC ---
This works for the 3 examples:
...
Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c (revision 182098)
+++ tree-ssa-sccvn.c (working copy)
@@ -3360,8 +3360,7 @@ visit_use (tree use)
       /* ???  We should handle stores from calls.  */
       else if (TREE_CODE (lhs) == SSA_NAME)
         {
-          if (!gimple_call_internal_p (stmt)
-          && gimple_call_flags (stmt) & (ECF_PURE | ECF_CONST))
+          if (!gimple_call_internal_p (stmt))
         changed = visit_reference_op_call (lhs, stmt);
           else
         changed = defs_to_varying (stmt);
...

I'll test this to see what breaks.

Reply via email to