Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 263068) +++ gcc/ChangeLog (revision 263067) @@ -1,8 +1,3 @@ -2018-07-30 Bernd Edlinger - - * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL - terminated string literal. - 2018-07-30 Segher Boessenkool PR rtl-optimization/85160 Index: gcc/tree-ssa-forwprop.c =================================================================== --- gcc/tree-ssa-forwprop.c (revision 263068) +++ gcc/tree-ssa-forwprop.c (revision 263067) @@ -1391,7 +1391,7 @@ 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