re PR c/8467 (Bug in sibling call optimization)

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
This commit is contained in:
Franz Sirl 2002-11-11 20:52:30 +00:00 committed by Franz Sirl
parent 1b2f07038e
commit 7c12a71b98
2 changed files with 18 additions and 2 deletions

View 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

View 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 ();