diff options
author | Richard Guenther <rguenther@suse.de> | 2011-03-22 12:40:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-03-22 12:40:09 +0000 |
commit | 7bec30e1097eacc991e358cc7a97b6b22f611a31 (patch) | |
tree | 824eb6fe401f7e31b326b3f9e241700f0ecfbc54 /gcc/tree-vrp.c | |
parent | 0b7e851b85afb78125a8cce3f5f0bf332124541f (diff) | |
download | gcc-7bec30e1097eacc991e358cc7a97b6b22f611a31.zip gcc-7bec30e1097eacc991e358cc7a97b6b22f611a31.tar.gz gcc-7bec30e1097eacc991e358cc7a97b6b22f611a31.tar.bz2 |
re PR tree-optimization/48228 (incorrect signed overflow warning when only 0 and 1 are used)
2011-03-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48228
* tree-vrp.c (vrp_visit_phi_node): Do not stop propagating
for single-arg PHIs.
* gcc.dg/Wstrict-overflow-23.c: New testcase.
From-SVN: r171287
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index d2e6551..42ea910 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6619,6 +6619,7 @@ vrp_visit_phi_node (gimple phi) edge; this helps us avoid an overflow infinity for conditionals which are not in a loop. */ if (edges > 0 + && gimple_phi_num_args (phi) > 1 && edges == old_edges) { int cmp_min = compare_values (lhs_vr->min, vr_result.min); |