Commit cff431d2 by Bernd Edlinger Committed by Bernd Edlinger

tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL terminated string literal.

2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
        terminated string literal.

From-SVN: r263068
parent c4c5ad1d
2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
terminated string literal.
2018-07-30 Segher Boessenkool <segher@kernel.crashing.org> 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85160 PR rtl-optimization/85160
......
...@@ -1391,7 +1391,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) ...@@ -1391,7 +1391,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
src_buf, ptr1_align, false)) src_buf, ptr1_align, false))
break; break;
new_str_cst = build_string_literal (src_len, src_buf); new_str_cst = build_string_literal (src_len + 1, src_buf);
if (callee1) if (callee1)
{ {
/* If STMT1 is a mem{,p}cpy call, adjust it and remove /* If STMT1 is a mem{,p}cpy call, adjust it and remove
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment