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

--- Comment #59 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
just to explain what happens in the testcase.  There is test and testb. They
are almost same:

int
testb(void)
{
  struct bar *fp;
  test2 ((void *)&fp);
  fp = NULL;
  (*ptr)++;
  test3 ((void *)&fp);
}
the difference is in the alias set of FP. In one case it aliases with the
(*ptr)++ while in other it does not.  This makes one function to have jump
function specifying aggregate value of 0 for *fp, while other does not.

Now with LTO both struct bar and foo becomes compatible for TBAA, so the
functions gets merged and the winning variant has the jump function specifying
aggregate 0, which is wrong in the context code is invoked.

Reply via email to