https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65752

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |61502, 49330

--- Comment #49 from Richard Biener <rguenth at gcc dot gnu.org> ---
Related testcase from PR61502:

#include <stdio.h>

int main()
{
   int x, y = 1;
   int *volatile v;
   int *p;

   v = &y;
   p = v;
   if (p == &x + 1) {
     *p = 2;
     printf("y = %d\n", y);
   }
}

which shows how propagating conditional equivalences (&x+1 into *p = 2) breaks
alias analysis.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330
[Bug 49330] Integer arithmetic on addresses optimised with pointer arithmetic
rules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61502
[Bug 61502] == comparison on "one-past" pointer gives wrong result

Reply via email to