summaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-11 16:05:37 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-11 16:05:37 +0000
commite3625844fba13bd71af4adfd0f326875dc5d36b8 (patch)
treed54ada4cbde7ded1a040c5e4405cf669b2b3c13c /gcc/tree-vrp.c
parentdb2ad24965116a95f6e4a932cdfec09ee8e328d5 (diff)
downloadgcc-e3625844fba13bd71af4adfd0f326875dc5d36b8.tar.gz
2006-10-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28230 * tree-vrp.c (vrp_int_const_binop): Move flag_wrapv handling to the correct place. * gcc.dg/torture/pr28230.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index a2127446a85..4a30e4ee8a5 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1235,14 +1235,12 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2)
{
tree res;
- if (flag_wrapv)
- return int_const_binop (code, val1, val2, 0);
+ res = int_const_binop (code, val1, val2, 0);
/* If we are not using wrapping arithmetic, operate symbolically
on -INF and +INF. */
- res = int_const_binop (code, val1, val2, 0);
-
- if (TYPE_UNSIGNED (TREE_TYPE (val1)))
+ if (TYPE_UNSIGNED (TREE_TYPE (val1))
+ || flag_wrapv)
{
int checkz = compare_values (res, val1);
bool overflow = false;