summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index aea7edfb6f8..371620e1b4f 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2156,9 +2156,10 @@ evaluate_stmt (gimple stmt)
if (INTEGRAL_TYPE_P (TREE_TYPE (rhs1))
|| POINTER_TYPE_P (TREE_TYPE (rhs1)))
{
+ tree lhs = gimple_assign_lhs (stmt);
tree rhs2 = gimple_assign_rhs2 (stmt);
val = bit_value_binop (subcode,
- TREE_TYPE (rhs1), rhs1, rhs2);
+ TREE_TYPE (lhs), rhs1, rhs2);
}
break;