From e07e405d7b1e06496a9a4819091205ee22ac7532 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 1 Jun 2007 22:47:02 +0000 Subject: tree-vrp.c (compare_name_with_value): Always set used_strict_overflow if we get a result from the variable itself. ./: * tree-vrp.c (compare_name_with_value): Always set used_strict_overflow if we get a result from the variable itself. testsuite/: * gcc.dg/Wstrict-overflow-17.c: New test. From-SVN: r125269 --- gcc/tree-vrp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree-vrp.c') diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 80744d6..e0a55a8 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -4676,8 +4676,8 @@ compare_name_with_value (enum tree_code comp, tree var, tree val, equiv_vr = get_vr_for_comparison (SSA_NAME_VERSION (var)); sop = false; retval = compare_range_with_value (comp, &equiv_vr, val, &sop); - if (sop) - used_strict_overflow = 1; + if (retval) + used_strict_overflow = sop ? 1 : 0; /* If the equiv set is empty we have done all work we need to do. */ if (e == NULL) -- cgit v1.1