zig icon indicating copy to clipboard operation
zig copied to clipboard

Boolean Vector with >=2 length cause compile failure

Open ryoppippi opened this issue 2 years ago • 1 comments

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.

ryoppippi avatar Jul 19 '22 12:07 ryoppippi

I could reproduce this problem on another Intel mac!

ryoppippi avatar Jul 20 '22 08:07 ryoppippi

Today I tested on v0.10.0-dev.4166+cae76d829 and it works fine Edit: I tested on self-hosted one

ryoppippi avatar Sep 25 '22 10:09 ryoppippi

self-hosted is the default compiler, so if its fixed there that's what matters

nektro avatar Sep 25 '22 17:09 nektro

Okay I think it is fixed.

ryoppippi avatar Sep 25 '22 21:09 ryoppippi