diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-15 17:17:59 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-15 17:17:59 -0700 |
| commit | 186126c2a4032424e1b1cdb8ac379fb2beab7429 (patch) | |
| tree | 32aa04aa0e19f7a9b4d51677c2051a3b7d7048c4 /test/behavior/basic.zig | |
| parent | 0536c25578fa15e2326eb1061f6db61d6ad3cd65 (diff) | |
| download | zig-186126c2a4032424e1b1cdb8ac379fb2beab7429.tar.gz zig-186126c2a4032424e1b1cdb8ac379fb2beab7429.zip | |
stage2: make hasCodeGenBits() always true for pointers
* LLVM backend: The `alloc` AIR instruction as well as pointer
constants which point to a 0-bit element type now call a common
codepath to produce a `*const llvm.Value` which is a non-zero pointer
with a bogus-but-properly-aligned address.
* LLVM backend: improve the lowering of optional types.
* Type: `hasCodeGenBits()` now returns `true` for pointers even when
it returns `false` for their element types.
Effectively, #6706 is now implemented in stage2 but not stage1.
Diffstat (limited to 'test/behavior/basic.zig')
| -rw-r--r-- | test/behavior/basic.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index 23b0970191..ae4cb26354 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -246,7 +246,7 @@ fn testTakeAddressOfParameter(f: f32) !void { } test "pointer to void return type" { - testPointerToVoidReturnType() catch unreachable; + try testPointerToVoidReturnType(); } fn testPointerToVoidReturnType() anyerror!void { const a = testPointerToVoidReturnType2(); |
