https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77899
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-09-06 Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> --- p_6 = &d[130] + _1; if (&MEM <char[260]> [(void *)&d + 2B] > p_6) Even this should be folded but is not currently: void f (signed char i) { char d [260]; const char *p = &d[130]; p += i; if (p == d + 2 || d + 257 == p) __builtin_abort (); } I am thinking ptr_difference_const is not able to handle &MEM <char[260]> [(void *)&d + 2B] correctly.