summaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-09 11:34:28 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-09 11:34:28 +0000
commit0da2010bfd55fc5445a1504d10ef7223788faed9 (patch)
tree4f9727618b68994094a646267710d8c5a27e1d36 /gcc/tree-vrp.c
parent7c96794044ca6038994331cf975e1825ca2b4433 (diff)
downloadgcc-0da2010bfd55fc5445a1504d10ef7223788faed9.tar.gz
2010-02-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43000 * tree-vrp.c (vrp_int_const_binop): Only handle unsigned arithmetic manually. * gcc.dg/torture/pr43000.c: New testcase. * gcc.dg/torture/pr43002.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index c1ba16a04c2..73dcf23a558 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1898,9 +1898,9 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2)
res = int_const_binop (code, val1, val2, 0);
- /* If we are not using wrapping arithmetic, operate symbolically
- on -INF and +INF. */
- if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (val1)))
+ /* If we are using unsigned arithmetic, operate symbolically
+ on -INF and +INF as int_const_binop only handles signed overflow. */
+ if (TYPE_UNSIGNED (TREE_TYPE (val1)))
{
int checkz = compare_values (res, val1);
bool overflow = false;