You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results in the following LLVM error propagated through zig.
$ zig build-exe src/bug.zig
broken LLVM module found: Stored value type does not match pointer operand type!
store float* %4, float* %3, !dbg !1064
floatStored value type does not match pointer operand type!
store i64 4, float* %5, !dbg !1064
float
This is a bug in the Zig compiler.
Unable to dump stack trace: debug info stripped
Abort trap: 6
The text was updated successfully, but these errors were encountered:
[4]f32{ src[0..4] } — this is trying to make an array where arr[0] = src[0..4]. The compiler should really be catching this failed coercion.
#863 has the accepted proposal for converting slices back to arrays.
In the meantime here's some alternatives:
varvec: @Vector(4, f32) = [4]f32{ src[0], src[1], src[2], src[3] };
// This is so kludgy -- probably should wrap in a functionvararray=@ptrCast(*const [4]f32, src[0..4].ptr);
varvec2: @Vector(4, f32) =array.*;
daurnimator
added
bug
Observed behavior contradicts documented or intended behavior
stage1
The process of building from source via WebAssembly and the C backend.
labels
Dec 19, 2019
Ran into a compiler bug while trying to do some SIMD stuff.
Minimal repro, fails on master, macOS:
Results in the following LLVM error propagated through zig.
The text was updated successfully, but these errors were encountered: