aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index b5add82..6fabf10 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3018,7 +3018,7 @@ get_val_for (tree x, tree base)
else if (gimple_assign_rhs_class (stmt) == GIMPLE_UNARY_RHS
&& TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
return fold_build1 (gimple_assign_rhs_code (stmt),
- gimple_expr_type (stmt),
+ TREE_TYPE (gimple_assign_lhs (stmt)),
get_val_for (gimple_assign_rhs1 (stmt), base));
else if (gimple_assign_rhs_class (stmt) == GIMPLE_BINARY_RHS)
{
@@ -3031,7 +3031,7 @@ get_val_for (tree x, tree base)
else
gcc_unreachable ();
return fold_build2 (gimple_assign_rhs_code (stmt),
- gimple_expr_type (stmt), rhs1, rhs2);
+ TREE_TYPE (gimple_assign_lhs (stmt)), rhs1, rhs2);
}
else
gcc_unreachable ();