OSDN Git Service

* builtins.c (expand_builtin_stpcpy): Don't modify len.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Jul 2004 02:21:12 +0000 (02:21 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Jul 2004 02:21:12 +0000 (02:21 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84435 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c

index bac8a76..3fb67e7 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-09  Richard Henderson  <rth@redhat.com>
+
+       * builtins.c (expand_builtin_stpcpy): Don't modify len.
+
 2004-07-10  Kelley Cook  <kcook@gcc.gnu.org>
 
        * flags.h: Delete redundant prototypes that are being generated
index dd39967..91d3c87 100644 (file)
@@ -3102,7 +3102,7 @@ expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode)
     return 0;
   else
     {
-      tree dst, src, len;
+      tree dst, src, len, lenp1;
       tree narglist;
       rtx ret;
 
@@ -3117,8 +3117,8 @@ expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode)
                              target, /*endp=*/2);
 
       dst = TREE_VALUE (arglist);
-      len = fold (size_binop (PLUS_EXPR, len, ssize_int (1)));
-      narglist = build_tree_list (NULL_TREE, len);
+      lenp1 = size_binop (PLUS_EXPR, len, ssize_int (1));
+      narglist = build_tree_list (NULL_TREE, lenp1);
       narglist = tree_cons (NULL_TREE, src, narglist);
       narglist = tree_cons (NULL_TREE, dst, narglist);
       ret = expand_builtin_mempcpy (narglist, target, mode, /*endp=*/2);