#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
const S = struct { a: u32 };
export fn entry0() void {
    _ = @sizeOf(packed union {
        foo: S,
        bar: bool,
    });
}
export fn entry1() void {
    _ = @sizeOf(packed union {
        x: *const u32,
    });
}
export fn entry2() void {
    const E = enum(noreturn) {};
    _ = @sizeOf(packed union {
        x: E,
    });
}
#}
#update
#check errors {
test.zig:4:14: error: packed unions cannot contain fields of type 'test.S'
test.zig:4:14: note: non-packed structs do not have a bit-packed representation
test.zig:1:11: note: struct declared here
test.zig:10:12: error: packed unions cannot contain fields of type '*const u32'
test.zig:10:12: note: pointers cannot be directly bitpacked
test.zig:10:12: note: consider using 'usize' and '@intFromPtr'
test.zig:16:12: error: packed unions cannot contain fields of type 'test.entry2.E'
test.zig:16:12: note: type does not have a bit-packed representation
#}
