zig
zig copied to clipboard
Getting location of vector component for non-power-of-two type is broken on stage2
Zig Version
0.10.0-dev.3978+4fd4c733d
Steps to Reproduce
const std = @import("std");
pub fn main() !void {
var x: std.meta.Vector(2, u15) = .{ 1, 4 };
std.debug.print("{} {}\n", .{ (&x[0]).*, (&x[1]).* });
}
Expected Behavior
Output of 1 4
Actual Behavior
Output of 1 2, as the second integer is shifted down by 1 bit.