Commit 08298a8c by Richard Guenther Committed by Richard Biener

re PR tree-optimization/37181 (FAIL: Divide_1 -O3)

2008-08-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/37181
	* tree-vrp.c (extract_range_from_binary_expr): Check for NULL
	folding result.
	(extract_range_from_unary_expr): Likewise.

From-SVN: r139375
parent 96501113
2008-08-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37181
* tree-vrp.c (extract_range_from_binary_expr): Check for NULL
folding result.
(extract_range_from_unary_expr): Likewise.
2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* diagnostic.c (pedwarn_at): Rename as pedwarn. * diagnostic.c (pedwarn_at): Rename as pedwarn.
......
...@@ -2062,7 +2062,8 @@ extract_range_from_binary_expr (value_range_t *vr, ...@@ -2062,7 +2062,8 @@ extract_range_from_binary_expr (value_range_t *vr,
&& (op1 = op_with_constant_singleton_value_range (op1)) != NULL_TREE) && (op1 = op_with_constant_singleton_value_range (op1)) != NULL_TREE)
{ {
tree tem = fold_binary (code, expr_type, op0, op1); tree tem = fold_binary (code, expr_type, op0, op1);
if (is_gimple_min_invariant (tem) if (tem
&& is_gimple_min_invariant (tem)
&& !is_overflow_infinity (tem)) && !is_overflow_infinity (tem))
{ {
set_value_range (vr, VR_RANGE, tem, tem, NULL); set_value_range (vr, VR_RANGE, tem, tem, NULL);
...@@ -2477,7 +2478,8 @@ extract_range_from_unary_expr (value_range_t *vr, enum tree_code code, ...@@ -2477,7 +2478,8 @@ extract_range_from_unary_expr (value_range_t *vr, enum tree_code code,
if ((op0 = op_with_constant_singleton_value_range (op0)) != NULL_TREE) if ((op0 = op_with_constant_singleton_value_range (op0)) != NULL_TREE)
{ {
tree tem = fold_unary (code, type, op0); tree tem = fold_unary (code, type, op0);
if (is_gimple_min_invariant (tem) if (tem
&& is_gimple_min_invariant (tem)
&& !is_overflow_infinity (tem)) && !is_overflow_infinity (tem))
{ {
set_value_range (vr, VR_RANGE, tem, tem, NULL); set_value_range (vr, VR_RANGE, tem, tem, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment