aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-08-20 11:12:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-08-20 11:12:05 +0200
commit081db96050b57d83e0f82bd74c3a22cf7b93c2ed (patch)
treeca1b85138593c09499fa1fc840dae8fc9e21b127 /gcc/tree-ssa-forwprop.c
parentd17fd79ca1fcad80aa66203b081aea61b758b814 (diff)
downloadgcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.zip
gcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.tar.gz
gcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.tar.bz2
re PR middle-end/54321 (ice in tree_low_cst at -O3)
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. From-SVN: r190526
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 78e17a5..bd9b72b 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. */