stage2: fix @sizeOf for structs with comptime fields

This commit is contained in:
Andrew Kelley
2022-05-04 18:45:59 -07:00
parent 2f6a01d0c3
commit af7e945a7d
4 changed files with 15 additions and 1 deletions

View File

@@ -120,6 +120,10 @@ test "bitcast generates a temporary value" {
}
test "@bitCast packed structs at runtime and comptime" {
if (builtin.zig_backend == .stage1) {
// stage1 gets the wrong answer for a lot of targets
return error.SkipZigTest;
}
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;