https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67376
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Dec 22 20:47:58 2015 New Revision: 231909 URL: https://gcc.gnu.org/viewcvs?rev=231909&root=gcc&view=rev Log: PR c++/67376 * fold-const.c (size_low_cst): Removed. (fold_comparison): For POINTER_PLUS_EXPR where base is ADDR_EXPR call get_inner_reference and handle INDIRECT_REF base of it. Use offset_int for computation of the bitpos. (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Formatting fixes for X +- Y CMP X and C - X CMP X folding. Add X CMP X +- Y and X CMP C - X folding. * g++.dg/cpp0x/constexpr-67376.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-67376.C Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog