summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-19 14:38:45 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-19 14:38:45 +0000
commita0c9f8faadf272fc9fb5a48979d3de7a54d7ee8b (patch)
tree48731f2107a6ce3a518f75d46daa40a0bc6aca9b /gcc/expr.c
parent073c9cd5a32cd6872dcc9f061241001b967c85c8 (diff)
downloadgcc-a0c9f8faadf272fc9fb5a48979d3de7a54d7ee8b.tar.gz
* expr.c (expand_expr): Use gen_int_mode for the argument
to gen_rtx_MULT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 601c5e991ab..926f10e4886 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8089,6 +8089,8 @@ expand_expr (exp, target, tmode, modifier)
if (modifier == EXPAND_SUM && mode == ptr_mode
&& host_integerp (TREE_OPERAND (exp, 1), 0))
{
+ tree exp1 = TREE_OPERAND (exp, 1);
+
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode,
EXPAND_SUM);
@@ -8107,9 +8109,9 @@ expand_expr (exp, target, tmode, modifier)
if (GET_CODE (op0) != REG)
op0 = copy_to_mode_reg (mode, op0);
- return
- gen_rtx_MULT (mode, op0,
- GEN_INT (tree_low_cst (TREE_OPERAND (exp, 1), 0)));
+ return gen_rtx_MULT (mode, op0,
+ gen_int_mode (tree_low_cst (exp1, 0),
+ TYPE_MODE (TREE_TYPE (exp1))));
}
if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))