OSDN Git Service

* builtins.c (expand_builtin_stpcpy): Do not create temporary
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jul 2004 17:19:20 +0000 (17:19 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jul 2004 17:19:20 +0000 (17:19 +0000)
reg with VOIDmode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84825 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c

index bb16251..e321169 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-16  Steve Ellcey  <sje@cup.hp.com>
+
+       * builtins.c (expand_builtin_stpcpy): Do not create temporary
+       reg with VOIDmode.
+
 2004-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/eabi.asm (__eabi_convert): Fix typo (cmpi vs. cmpwi).
index 58eafd4..d83b0de 100644 (file)
@@ -3130,7 +3130,12 @@ expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode)
              if (ret)
                {
                  if (! target)
-                   target = gen_reg_rtx (mode);
+                   {
+                     if (mode != VOIDmode)
+                       target = gen_reg_rtx (mode);
+                     else
+                       target = gen_reg_rtx (GET_MODE (ret));
+                   }
                  if (GET_MODE (target) != GET_MODE (ret))
                    ret = gen_lowpart (GET_MODE (target), ret);