zig
zig copied to clipboard
Boolean Vector with >=2 length cause compile failure
Zig Version
0.10.0-dev.3007+6ba2fb3db
Steps to Reproduce
execute these code on macos 12.4(21F79)on M1 mac.
pub fn main() void {
const value = @Vector(2, bool){ true, true };
_ = value;
}
❯ zig build main.zig
LLVM Emit Object... error(link): undefined reference to symbol ''
error(link): first referenced in '/Users/ryoppippi/.cache/zig/o/a1b7b8edf6233f50d412d5ea3dfd4a1c/main.o'
error: UndefinedSymbolReference
pub fn main() void {
const value = @Vector(1, bool){true};
_ = value;
}
❯ zig run src/main.zig
❯
Expected Behavior
Works fine with all boolean vectors
Actual Behavior
When the length of the boolean vector is two or more, cannot compile. However, code can be compiled when the length is one.
I could reproduce this problem on another Intel mac!
Today I tested on v0.10.0-dev.4166+cae76d829
and it works fine
Edit: I tested on self-hosted one
self-hosted is the default compiler, so if its fixed there that's what matters
Okay I think it is fixed.