From 19e1413b5dc797995ed95bbd6ca6e3035103d982 Mon Sep 17 00:00:00 2001 From: obrien Date: Sat, 22 Jan 2000 02:59:08 +0000 Subject: Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch" branch on Jan 20th, 2000. --- contrib/gcc/stmt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib/gcc/stmt.c') diff --git a/contrib/gcc/stmt.c b/contrib/gcc/stmt.c index 018e190..f55b2c9 100644 --- a/contrib/gcc/stmt.c +++ b/contrib/gcc/stmt.c @@ -2511,15 +2511,15 @@ expand_value_return (val) #ifdef PROMOTE_FUNCTION_RETURN tree type = TREE_TYPE (DECL_RESULT (current_function_decl)); int unsignedp = TREE_UNSIGNED (type); + enum machine_mode old_mode + = DECL_MODE (DECL_RESULT (current_function_decl)); enum machine_mode mode - = promote_mode (type, DECL_MODE (DECL_RESULT (current_function_decl)), - &unsignedp, 1); + = promote_mode (type, old_mode, &unsignedp, 1); - if (GET_MODE (val) != VOIDmode && GET_MODE (val) != mode) - convert_move (return_reg, val, unsignedp); - else + if (mode != old_mode) + val = convert_modes (mode, old_mode, val, unsignedp); #endif - emit_move_insn (return_reg, val); + emit_move_insn (return_reg, val); } if (GET_CODE (return_reg) == REG && REGNO (return_reg) < FIRST_PSEUDO_REGISTER) -- cgit v1.1