public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* TBAA bug?
@ 2021-07-25 11:58 Uecker, Martin
  2021-07-27  8:02 ` Richard Biener
  2021-07-27  8:05 ` Richard Biener
  0 siblings, 2 replies; 4+ messages in thread
From: Uecker, Martin @ 2021-07-25 11:58 UTC (permalink / raw)
  To: richard.guenther; +Cc: gcc



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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-27 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 11:58 TBAA bug? Uecker, Martin
2021-07-27  8:02 ` Richard Biener
2021-07-27  8:05 ` Richard Biener
2021-07-27 12:08   ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).