summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-01 19:44:47 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-01 19:44:47 +0000
commitfaa7d37b3be5a96871442b7a0761064048b56ec7 (patch)
tree48daff7f42bc9bf65eb2c0c19a65b31cff51cccb /gcc/expr.c
parentf349497507fecb0927a8a8893e93a712921c8c4a (diff)
downloadgcc-faa7d37b3be5a96871442b7a0761064048b56ec7.tar.gz
2006-02-01 Paul Brook <paul@codesourcery.com>
* function.c (assign_parm_setup_reg): Use function argument promotion rules. * expr.c (expand_expr_real_1): Use function argument promotion rules for PARM_DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 362ab8b5756..832cc52a421 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6774,7 +6774,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* Get the signedness used for this variable. Ensure we get the
same mode we got when the variable was declared. */
pmode = promote_mode (type, DECL_MODE (exp), &unsignedp,
- (TREE_CODE (exp) == RESULT_DECL ? 1 : 0));
+ (TREE_CODE (exp) == RESULT_DECL
+ || TREE_CODE (exp) == PARM_DECL) ? 1 : 0);
gcc_assert (GET_MODE (DECL_RTL (exp)) == pmode);
temp = gen_lowpart_SUBREG (mode, DECL_RTL (exp));