// #target: macos-x64
module test;

union UnionB
{
    struct b
    {
        int a;
    }
    int c;
    double d;
}

extern fn int bar();

fn void test()
{
    UnionB b = { .c = bar(), .b = {} };
}

/* #expect: test.ll

define void @test.test() #0 {
entry:
  %b = alloca %UnionB, align 8
  %0 = call i32 @bar()
  store i32 %0, ptr %b, align 8
  store i32 0, ptr %b, align 8
  ret void
}
