diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 10:18:33 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 10:18:33 +0000 |
commit | f133b4855f2922b309e0d1d71c8fc930971b8086 (patch) | |
tree | 02a5fc059070d8f9cb3d69702c29ac84fe654190 /gcc/tree-vrp.c | |
parent | d09fd72c630c4886367f1977cdb366aa82950e32 (diff) | |
download | gcc-f133b4855f2922b309e0d1d71c8fc930971b8086.tar.gz |
2009-11-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/41919
* tree-vrp.c (test_for_singularity): Properly compare values.
* gcc.c-torture/execute/pr41919.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153891 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 0cb227abbd1..5adc0da84da 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6748,13 +6748,9 @@ test_for_singularity (enum tree_code cond_code, tree op0, value range information we have for op0. */ if (min && max) { - if (compare_values (vr->min, min) == -1) - min = min; - else + if (compare_values (vr->min, min) == 1) min = vr->min; - if (compare_values (vr->max, max) == 1) - max = max; - else + if (compare_values (vr->max, max) == -1) max = vr->max; /* If the new min/max values have converged to a single value, |