diff options
| author | Luuk de Gram <luuk@degram.dev> | 2023-05-15 21:53:24 +0200 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2023-05-19 20:20:26 +0200 |
| commit | 061d99285d5a73a71a97ed7bbb45f0a7f65acf2d (patch) | |
| tree | 844a8219a345ef94eab7b8e6df04eccd0e40c2e0 /test/behavior/slice.zig | |
| parent | 6c06944b5958e2b624004e986deee8e52c765e6e (diff) | |
| download | zig-061d99285d5a73a71a97ed7bbb45f0a7f65acf2d.tar.gz zig-061d99285d5a73a71a97ed7bbb45f0a7f65acf2d.zip | |
wasm: correctly use elem type when lowering
Previously when lowering a value of `elem_ptr` we would multiply the
abisize of the parent type by the index, rather than the element type.
This would result in an invalid pointer way beyond the correct pointer.
We now also pass the current offset to each recursive call to ensure
we do not miss inner offsets.
Diffstat (limited to 'test/behavior/slice.zig')
| -rw-r--r-- | test/behavior/slice.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/behavior/slice.zig b/test/behavior/slice.zig index 3b88636dca..bff90518ed 100644 --- a/test/behavior/slice.zig +++ b/test/behavior/slice.zig @@ -185,7 +185,6 @@ test "slicing zero length array" { } test "slicing pointer by length" { - if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const array = [_]u8{ 1, 2, 3, 4, 5, 6, 7, 8 }; |
