Skip to content

Boolean Vector with >=2 length cause compile failure #12169

@ryoppippi

Description

@ryoppippi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions