-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/24/11 08:11, Jakub Jelinek wrote: > Hi! > > Since Richard's build_int_cst changes to make it effectively > build_int_cst_type when extract_range_from_assert wants to > subtract or add 1 to min or max of a signed 1-bit precision type, > build_int_cst (..., 1) returns actually -1 constant and that > overflows on the fold_build2, leading to ICEs later on. > > This patch in that case adds resp. subtracts -1 instead of > subtracting resp. adding 1. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2011-11-24 Jakub Jelinek <ja...@redhat.com> > > PR tree-optimization/51247 * tree-vrp.c > (extract_range_from_assert): For signed 1-bit precision types > instead of adding 1 subtract -1 and instead of subtracting 1 add -1 > to avoid overflows. > > * gcc.c-torture/compile/pr51247.c: New test. OK. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJO1TbpAAoJEBRtltQi2kC71WEH/245Qoeaa/F+aUlSNPT8b+6o kDXV7/GOyS+ruCswd+FYFn9pEE2bmhFq1o98oyqHqjFAXYeAlRxF+pbAL1X8DN0y ANcdlbBxIYC0aKpLVn+VvS5ans/LgIZbon8yQ0iZhdcUDwAU66H57HBZ6d8kWr1K j5c3AsdTRmsTE9/e98XHo9xEcBXtEUcIfp841ABJ046xq7i4zixIDtx+L9El633U cGgBhz42e94eelfEOzqPQ9KE/+3Xfm7Z8mpc3Tr8su7vEmrDP2EaKw9F0daDOavb zCIYfi1Svwdq1ZZgTG3XOZ2cGt51x4VQ25aOCahXXYMpsZrW/6t/0Lsf9xydrD4= =FXf4 -----END PGP SIGNATURE-----