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

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Testcase from PR81028

extern void abort();

typedef int A;
typedef float B;

void __attribute__((noinline,noclone))
foo(A *p, B *q, long unk)
{
  for (long i = 0; i < unk; ++i) {
      *p = 1;
      q[i] = 42;
  }
}

int main(void)
{
  union { A x; B f; } u;
  foo(&u.x, &u.f, 1);
  if (u.f != 42) abort();
  return 0;
}

Reply via email to