Hi Richard,

here is another case where it seems that TBAA goes
wrong. Since this is not in a loop, it seems this
is something else than what we discussed. Is
this a known issue?

Best,
Martin


#include <stdio.h>
#include <stdlib.h>

union u {
  long x;
  long long y;
};

__attribute__((noinline,noclone))
long test(long *px, long long *py, union u *pu)
{
  *px = 0;
  *py = 1;

  long xy = pu->y;
  pu->x = xy;

  return *px;
}

int main(void)
{
  union u u;
  printf("%ld\n", test(&u.x, &u.y, &u));
}

https://godbolt.org/z/a9drezEza

Reply via email to