From aca42c62598523b92de7a51d3d84f2f2e5146536 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 23 Mar 2022 19:58:13 -0700 Subject: Sema: fix comptime elem_ptr compare fixed address --- test/behavior/pointers.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/behavior/pointers.zig') diff --git a/test/behavior/pointers.zig b/test/behavior/pointers.zig index 297c9be7b8..5b9c3c8cf0 100644 --- a/test/behavior/pointers.zig +++ b/test/behavior/pointers.zig @@ -366,11 +366,10 @@ test "pointer sentinel with +inf" { } test "pointer to array at fixed address" { - if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO - - const array = @intToPtr(*volatile [1]u32, 0x10); + const array = @intToPtr(*volatile [2]u32, 0x10); // Silly check just to reference `array` try expect(@ptrToInt(&array[0]) == 0x10); + try expect(@ptrToInt(&array[1]) == 0x14); } test "pointer arithmetic affects the alignment" { -- cgit v1.2.3