johannes 02/11/27 11:10:41 Modified: live/gcc3/gcc stmt.c Log: Bug #: 3109864 Submitted by: Franz Sirl (FSF) Reviewed by: dalej Remove bogus promotion to int when doing tail recursion with an unsigned short param. Fixed in FSF in response to PR 8467, which may well be the same failing project (gcc.gnu.org is down right now so I can't check) Revision Changes Path 1.17 +12 -2 src/live/gcc3/gcc/stmt.c Index: stmt.c =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/stmt.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- stmt.c 2002/10/24 23:43:09 1.16 +++ stmt.c 2002/11/27 19:10:41 1.17 @@ -3311,8 +3311,18 @@ 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 ();