]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/8467 (Bug in sibling call optimization)
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>
Mon, 11 Nov 2002 20:52:30 +0000 (20:52 +0000)
committerFranz Sirl <sirl@gcc.gnu.org>
Mon, 11 Nov 2002 20:52:30 +0000 (20:52 +0000)
2002-11-11  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

PR c/8467
* stmt.c (tail_recursion_args): Handle DECL_MODE differing from the
mode of DECL_RTL case.

From-SVN: r59022

gcc/ChangeLog
gcc/stmt.c

index 87a9c71974b0d2ac7c2515f7ca9a403dc6dc6e9d..dbb7ad207deea2e8c645815babdf3a74811da7d0 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-11  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       PR c/8467
+       * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the
+       mode of DECL_RTL case.
+
 2002-11-11  Neil Booth  <neil@daikokuya.co.uk>
 
        PR preprocessor/4890
index e01089370259432ce455ecda20bc92e0e11401e9..4ba30217e9c47e5eacdde55079a30b3c6369ff2b 100644 (file)
@@ -3351,8 +3351,18 @@ tail_recursion_args (actuals, formals)
       if (GET_MODE (DECL_RTL (f)) == GET_MODE (argvec[i]))
        emit_move_insn (DECL_RTL (f), argvec[i]);
       else
-       convert_move (DECL_RTL (f), argvec[i],
-                     TREE_UNSIGNED (TREE_TYPE (TREE_VALUE (a))));
+       {
+         rtx tmp = argvec[i];
+
+         if (DECL_MODE (f) != GET_MODE (DECL_RTL (f)))
+           {
+             tmp = gen_reg_rtx (DECL_MODE (f));
+             convert_move (tmp, argvec[i],
+                           TREE_UNSIGNED (TREE_TYPE (TREE_VALUE (a))));
+           }
+         convert_move (DECL_RTL (f), tmp,
+                       TREE_UNSIGNED (TREE_TYPE (TREE_VALUE (a))));
+       }
     }
 
   free_temp_slots ();