http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58564
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed May 7 16:05:38 2014 New Revision: 210174 URL: http://gcc.gnu.org/viewcvs?rev=210174&root=gcc&view=rev Log: Backported from mainline 2013-09-30 Jakub Jelinek <ja...@redhat.com> PR middle-end/58564 * fold-const.c (fold_ternary_loc): For A < 0 : <sign bit of A> : 0 optimization, punt if sign_bit_p looked through any zero extension. * gcc.c-torture/execute/pr58564.c: New test. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/execute/pr58564.c Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/fold-const.c branches/gcc-4_7-branch/gcc/testsuite/ChangeLog