This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/41058] FAIL: ext/pb_ds/regression/hash_data_map_rand.cc



------- Comment #15 from rguenth at gcc dot gnu dot org  2009-08-28 10:59 -------
Index: cp/cp-gimplify.c
===================================================================
--- cp/cp-gimplify.c    (revision 151156)
+++ cp/cp-gimplify.c    (working copy)
@@ -853,6 +853,15 @@ cp_genericize_r (tree *stmt_p, int *walk
       *walk_subtrees = 0;
     }

+  else if (TREE_CODE (stmt) == MODIFY_EXPR
+          && (integer_zerop (cp_expr_size (TREE_OPERAND (stmt, 0)))
+              || integer_zerop (cp_expr_size (TREE_OPERAND (stmt, 1)))))
+    {
+      *stmt_p = build2 (COMPOUND_EXPR, TREE_TYPE (stmt),
+                       TREE_OPERAND (stmt, 0),
+                       TREE_OPERAND (stmt, 1));
+    }
+
   pointer_set_insert (p_set, *stmt_p);

   return NULL;


fixes the testcase on the lto branch.  I'm going to test this patch on trunk.
Jason - might there be any reason this is not correct?


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]