Closed
Description
Zig Version
0.15.0-dev.828+3ce8d19f7
Steps to Reproduce and Observed Behavior
pub fn main() !void {
@compileLog(@sizeOf(@Vector(2, f32)));
}
Observe that this prints different values depending on the backend
$ zig-debug run test.zig
...
Compile Log Output:
@as(comptime_int, 16)
$ zig-debug run test.zig -fllvm
...
Compile Log Output:
@as(comptime_int, 8)
Expected Behavior
The size of vector types, which are usable in extern structs, must be independent of the backend.
Current behavior violates the promise that extern structs have a well-defined in-memory layout.