https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68835
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 18 14:38:17 2015 New Revision: 231817 URL: https://gcc.gnu.org/viewcvs?rev=231817&root=gcc&view=rev Log: Backported from mainline 2015-12-17 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/68835 * tree.c (get_int_cst_ext_nunits): Return cst.get_precision () / HOST_BITS_PER_WIDE_INT + 1 for all unsigned wi::neg_p (cst) constants. (build_new_int_cst): If cst.get_precision is not a multiple of HOST_BITS_PER_WIDE_INT, zero extend -1 to the precision % HOST_BITS_PER_WIDE_INT. * gcc.dg/pr68835-1.c: New test. * gcc.dg/pr68835-2.c: New test. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr68835-1.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr68835-2.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/tree.c