aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/array.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-02-23 23:27:49 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-02-23 23:59:25 -0700
commit6249a24e81b9b3df3d5ca99b57f22470b9ac486c (patch)
tree7f9ad767459ce5c1227365368d9034576b04e018 /test/behavior/array.zig
parent65c04759709a64d1ad0529623bab804b97c02cbc (diff)
downloadzig-6249a24e81b9b3df3d5ca99b57f22470b9ac486c.tar.gz
zig-6249a24e81b9b3df3d5ca99b57f22470b9ac486c.zip
stage2: integer-backed packed structs
This implements #10113 for the self-hosted compiler only. It removes the ability to override alignment of packed struct fields, and removes the ability to put pointers and arrays inside packed structs. After this commit, nearly all the behavior tests pass for the stage2 llvm backend that involve packed structs. I didn't implement the compile errors or compile error tests yet. I'm waiting until we have stage2 building itself and then I want to rework the compile error test harness with inspiration from Vexu's arocc test harness. At that point it should be a much nicer dev experience to work on compile errors.
Diffstat (limited to 'test/behavior/array.zig')
-rw-r--r--test/behavior/array.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig
index 0bbdad44c4..2d4d1368f5 100644
--- a/test/behavior/array.zig
+++ b/test/behavior/array.zig
@@ -473,8 +473,8 @@ test "type deduction for array subscript expression" {
}
test "sentinel element count towards the ABI size calculation" {
- if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
@@ -482,7 +482,7 @@ test "sentinel element count towards the ABI size calculation" {
const S = struct {
fn doTheTest() !void {
- const T = packed struct {
+ const T = extern struct {
fill_pre: u8 = 0x55,
data: [0:0]u8 = undefined,
fill_post: u8 = 0xAA,
@@ -500,7 +500,7 @@ test "sentinel element count towards the ABI size calculation" {
}
test "zero-sized array with recursive type definition" {
- if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
@@ -525,7 +525,7 @@ test "zero-sized array with recursive type definition" {
}
test "type coercion of anon struct literal to array" {
- if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
@@ -561,8 +561,8 @@ test "type coercion of anon struct literal to array" {
}
test "type coercion of pointer to anon struct literal to pointer to array" {
- if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO