aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-08-20 09:12:05 +0000
committerJakub Jelinek <jakub@redhat.com>2012-08-20 09:12:05 +0000
commitc5428590cd6fdfce2a518c35b3d7d10d7f171f3e (patch)
treeca1b85138593c09499fa1fc840dae8fc9e21b127 /gcc/tree-ssa-forwprop.c
parent19c51f9cbc641124002ab56283c5fd333e4fe6f1 (diff)
PR tree-optimization/54321
* tree-ssa-forwprop.c (simplify_builtin_call): Pass 0 instead of 1 as second argument to tree_low_cst call on val2. * gcc.c-torture/compile/pr54321.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190526 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 78e17a55582..bd9b72b9ea5 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -1554,7 +1554,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
else
src_buf[0] = tree_low_cst (src1, 0);
memset (src_buf + tree_low_cst (diff, 1),
- tree_low_cst (val2, 1), tree_low_cst (len2, 1));
+ tree_low_cst (val2, 0), tree_low_cst (len2, 1));
src_buf[src_len] = '\0';
/* Neither builtin_strncpy_read_str nor builtin_memcpy_read_str
handle embedded '\0's. */