https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103813
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Another testcase: struct a { char b; char c[]; } ; struct a d; int main() { return d.c[0x40000000] || d.c[1]; } In GCC 10 (and before) fold would produce: return ((unsigned char) BIT_FIELD_REF <MEM <struct a> [(void *)&d], 8, 16> & 255) != 0; Which is a bit interesting because the d.c[0x40000000] part is left off.