static tree
fold_to_nonsharp_ineq_using_bound (location_t loc, tree ineq, tree bound)
{
- tree a, typea, type = TREE_TYPE (ineq), a1, diff, y;
+ tree a, typea, type = TREE_TYPE (bound), a1, diff, y;
if (TREE_CODE (bound) == LT_EXPR)
a = TREE_OPERAND (bound, 0);
{
tem = fold_to_nonsharp_ineq_using_bound (loc, arg0, arg1);
if (tem && !operand_equal_p (tem, arg0, 0))
- return fold_build2_loc (loc, code, type, tem, arg1);
+ return fold_convert (type,
+ fold_build2_loc (loc, code, TREE_TYPE (arg1),
+ tem, arg1));
tem = fold_to_nonsharp_ineq_using_bound (loc, arg1, arg0);
if (tem && !operand_equal_p (tem, arg1, 0))
- return fold_build2_loc (loc, code, type, arg0, tem);
+ return fold_convert (type,
+ fold_build2_loc (loc, code, TREE_TYPE (arg0),
+ arg0, tem));
}
if ((tem = fold_truth_andor (loc, code, type, arg0, arg1, op0, op1))