[Bug c/65752] Too strong optimizations int -> pointer casts

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 14 09:06:00 GMT 2015


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Other testcase:

int main()
{
  int *p;
  int x = 0;
  if (p == &x)
   *p = 1;
  return x;
}

we optimize this to return 0.  You probably wouldn't consider that invalid I
guess?



More information about the Gcc-bugs mailing list