From a70f3820a01ab530ecaf8d8d9ad535d1586acd3a Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 14 Sep 2018 19:56:32 +0000 Subject: 2018-09-14 Bernd Edlinger msebor@redhat.com> revert: 2018-07-30 Bernd Edlinger * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL terminated string literal. From-SVN: r264332 --- gcc/tree-ssa-forwprop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-ssa-forwprop.c') diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 6713398..b1ee598 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -1391,7 +1391,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) src_buf, ptr1_align, false)) break; - new_str_cst = build_string_literal (src_len + 1, src_buf); + new_str_cst = build_string_literal (src_len, src_buf); if (callee1) { /* If STMT1 is a mem{,p}cpy call, adjust it and remove -- cgit v1.1