Tested on x86_64-unknown-linux-gnu, applied. Richard.
2012-06-29 Richard Guenther <rguent...@suse.de> PR tree-optimization/52589 * gcc.dg/tree-ssa/vrp70.c: New testcase. Index: testsuite/gcc.dg/tree-ssa/vrp70.c =================================================================== --- testsuite/gcc.dg/tree-ssa/vrp70.c (revision 0) +++ testsuite/gcc.dg/tree-ssa/vrp70.c (working copy) @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-vrp1" } */ + +extern void link_error (void); + +void +foo (unsigned int s) +{ + if (s + 0x70000000 < 0xf0000000U) + { + if (s >= 0x80000000U && s < 0x90000000U) + link_error (); + } +} + +void +bar (unsigned int s) +{ + if (s + 0x70000000 >= 0xf0000000U) + { + if (s < 0x80000000U || s >= 0x90000000U) + link_error (); + } +} + +/* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */ +/* { dg-final { cleanup-tree-dump "vrp1" } } */