https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71310
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue May 9 12:24:53 2017 New Revision: 247789 URL: https://gcc.gnu.org/viewcvs?rev=247789&root=gcc&view=rev Log: PR testsuite/80678 2016-06-14 Richard Biener <rguent...@suse.de> PR middle-end/71310 PR bootstrap/71510 * expr.h (get_bit_range): Declare. * expr.c (get_bit_range): Export. * fold-const.c (optimize_bit_field_compare): Use get_bit_range and word_mode again to constrain the bitfield access. 2016-06-11 Segher Boessenkool <seg...@kernel.crashing.org> PR middle-end/71310 * fold-const.c (optimize_bit_field_compare): Don't try to use word_mode unconditionally for reading the bit field, look at DECL_BIT_FIELD_REPRESENTATIVE instead. * gcc.target/powerpc/pr71310.c: New testcase. Added: branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr71310.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/expr.c branches/gcc-6-branch/gcc/expr.h branches/gcc-6-branch/gcc/fold-const.c branches/gcc-6-branch/gcc/testsuite/ChangeLog