diff options
author | James P. Harvey | 2018-10-21 16:06:59 -0400 |
---|---|---|
committer | James P. Harvey | 2018-10-21 16:35:38 -0400 |
commit | b167dc68eaadd459ed6fd75489a0a4e99de269d2 (patch) | |
tree | 29066562976db7b28f6e97b9e377f2ccecba3b85 /bz87672.patch | |
parent | bd6511e2a28282bdb091eb08653590f8523b5cd9 (diff) | |
download | aur-b167dc68eaadd459ed6fd75489a0a4e99de269d2.tar.gz |
Upstream patch allows using current master again. Problem with 81512c36 reported upstream gcc.gnu.org/bugzilla/show_bug.cgi?id=87672 and fixed in bz87672.patch.
Diffstat (limited to 'bz87672.patch')
-rw-r--r-- | bz87672.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bz87672.patch b/bz87672.patch new file mode 100644 index 000000000000..d8c036831f9f --- /dev/null +++ b/bz87672.patch @@ -0,0 +1,30 @@ +Index: gcc/gimple-fold.c +=================================================================== +--- gcc/gimple-fold.c (revision 265240) ++++ gcc/gimple-fold.c (working copy) +@@ -2715,6 +2715,7 @@ gimple_fold_builtin_stxcpy_chk (gimple_stmt_iterat + return false; + + gimple_seq stmts = NULL; ++ len = force_gimple_operand (len, &stmts, true, NULL_TREE); + len = gimple_convert (&stmts, loc, size_type_node, len); + len = gimple_build (&stmts, loc, PLUS_EXPR, size_type_node, len, + build_int_cst (size_type_node, 1)); +Index: gcc/tree-ssa-strlen.c +=================================================================== +--- gcc/tree-ssa-strlen.c (revision 265240) ++++ gcc/tree-ssa-strlen.c (working copy) +@@ -2602,6 +2602,13 @@ handle_builtin_strcat (enum built_in_function bcod + len = force_gimple_operand_gsi (gsi, len, true, NULL_TREE, true, + GSI_SAME_STMT); + } ++ if (objsz) ++ { ++ objsz = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (objsz), ++ objsz, unshare_expr (dstlen)); ++ objsz = force_gimple_operand_gsi (gsi, objsz, true, NULL_TREE, true, ++ GSI_SAME_STMT); ++ } + if (endptr) + dst = fold_convert_loc (loc, TREE_TYPE (dst), unshare_expr (endptr)); + else |