https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94130
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly reduced testcase:
struct A { char a[6]; void *b; };
struct B { unsigned int c, d; };
static void __attribute__((noipa))
foo (struct A *x)
{
struct B *b = (struct B *) x->b;
if (b->c != 1234 || b->d)
__builtin_abort ();
}
int
main ()
{
struct A a;
struct B b;
__builtin_memset (&a, 0, sizeof (a));
__builtin_strncpy (a.a, "Hello", sizeof (a.a));
a.b = __builtin_memset (&b, 0, sizeof (b));
b.c = 1234;
b.d = 0;
foo (&a);
return 0;
}