aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-08-28 19:36:05 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-08-28 19:36:05 +0000
commit0b95297232736eb92981a0a79df27371bab7215a (patch)
treeb996ceee5e10825066fb23061e5589920b8b8f49 /gcc/cp/cp-gimplify.c
parent629fff4bf29ced5d30c05c836f2b8b71b29c6d2b (diff)
downloadgcc-0b95297232736eb92981a0a79df27371bab7215a.zip
gcc-0b95297232736eb92981a0a79df27371bab7215a.tar.gz
gcc-0b95297232736eb92981a0a79df27371bab7215a.tar.bz2
re PR lto/41058 (FAIL: ext/pb_ds/regression/hash_data_map_rand.cc)
2009-08-28 Richard Guenther <rguenther@suse.de> PR lto/41058 * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores into the generic IL. From-SVN: r151176
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index b4d36de4..52c12eb 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -853,6 +853,15 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
*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;