builtins.c (expand_builtin_stpcpy): Do not create temporary reg with VOIDmode.
authorSteve Ellcey <sje@cup.hp.com>
Fri, 16 Jul 2004 17:19:20 +0000 (17:19 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Fri, 16 Jul 2004 17:19:20 +0000 (17:19 +0000)
* builtins.c (expand_builtin_stpcpy): Do not create temporary
reg with VOIDmode.

From-SVN: r84825

gcc/ChangeLog
gcc/builtins.c

index bb162518d71b9beed5a6a1276c0e24e9aa4e3ca2..e3211698fc8a4d92f9bb1f11c2e1af2db4cfe400 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 58eafd403afa110c1c5e45e0164540df71dd4b8a..d83b0de27dea0e57c8eabe702b05bcee4f125ca2 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);