summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/stmt.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-01-22 02:59:08 +0000
committerobrien <obrien@FreeBSD.org>2000-01-22 02:59:08 +0000
commit19e1413b5dc797995ed95bbd6ca6e3035103d982 (patch)
tree42c6ebe0872fe26c06d5ea952dadd4bcfa2e1fc2 /contrib/gcc/stmt.c
parent06f3b914490df649b3b51002ca3211b12d1d0426 (diff)
downloadFreeBSD-src-19e1413b5dc797995ed95bbd6ca6e3035103d982.zip
FreeBSD-src-19e1413b5dc797995ed95bbd6ca6e3035103d982.tar.gz
Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch on Jan 20th, 2000.
Diffstat (limited to 'contrib/gcc/stmt.c')
-rw-r--r--contrib/gcc/stmt.c12
1 files changed, 6 insertions, 6 deletions
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)
OpenPOWER on IntegriCloud