Skip to content

stage2: Runtime result of @bitCast(u16, @Vector(16, bool)) is incorrect #13220

@topolarity

Description

@topolarity

Zig Version

0.10.0-dev.4430+78778899

Steps to Reproduce

const std = @import("std");
const expect = std.testing.expect;

test "bitcast vector to integer and back" {
    var x = @splat(16, true);
    x[1] = false;
    try expect(@bitCast(u16, x) == 0xfffd);
}

Expected Behavior

Test should pass, like it does on stage1.

Actual Behavior

Test fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-llvmThe LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.regressionIt worked in a previous version of Zig, but stopped working.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions