tree-vrp.c (extract_range_from_binary_expr): Clean up uses of vr0.type.
* tree-vrp.c (extract_range_from_binary_expr): Clean up uses of vr0.type. From-SVN: r108935
This commit is contained in:
parent
8ccfa1ccb9
commit
4e2d94a917
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-12-22 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
* tree-vrp.c (extract_range_from_binary_expr): Clean up uses
|
||||
of vr0.type.
|
||||
|
||||
2005-12-21 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR middle-end/24998
|
||||
|
|
|
@ -1167,6 +1167,7 @@ static void
|
|||
extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
||||
{
|
||||
enum tree_code code = TREE_CODE (expr);
|
||||
enum value_range_type type;
|
||||
tree op0, op1, min, max;
|
||||
int cmp;
|
||||
value_range_t vr0 = { VR_UNDEFINED, NULL_TREE, NULL_TREE, NULL };
|
||||
|
@ -1220,6 +1221,9 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
|||
return;
|
||||
}
|
||||
|
||||
/* The type of the resulting value range defaults to VR0.TYPE. */
|
||||
type = vr0.type;
|
||||
|
||||
/* Refuse to operate on VARYING ranges, ranges of different kinds
|
||||
and symbolic ranges. As an exception, we allow BIT_AND_EXPR
|
||||
because we may be able to derive a useful range even if one of
|
||||
|
@ -1425,7 +1429,7 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
|||
&& tree_expr_nonnegative_p (vr1.max)
|
||||
&& TREE_CODE (vr1.max) == INTEGER_CST)
|
||||
{
|
||||
vr0.type = VR_RANGE;
|
||||
type = VR_RANGE;
|
||||
min = fold_convert (TREE_TYPE (expr), integer_zero_node);
|
||||
max = vr1.max;
|
||||
}
|
||||
|
@ -1455,7 +1459,7 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
|||
set_value_range_to_varying (vr);
|
||||
}
|
||||
else
|
||||
set_value_range (vr, vr0.type, min, max, NULL);
|
||||
set_value_range (vr, type, min, max, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue