odin-lang/Odin Issue #4387: Panic: un-gep-able type #simd[4]f32
2024-10-17 12:07:36 DragosPopse
// odin build .
package main
main :: proc() {
b: #simd[4]f32
b.x = 10
}
produces `Odin\src\llvm_backend_utility.cpp(1438): Panic: un-gep-able type #simd[4]f32`
The code i originally encounterd this in:
package main
import "core:fmt"
main :: proc() {
a: [4]f32
b: #simd[4]f32
b.x = 10
fmt.printf("%v %v\n", align_of(a), align_of(b))
a += 10
b += b
fmt.printf("%v %v\n", a, b)
}
`odin report`:
Odin: dev-2024-09:8371ef668
OS: Windows 11 Professional (version: 23H2), build 22631.4317
CPU: AMD Ryzen 9 7900X 12-Core Processor
RAM: 64661 MiB
Backend: LLVM 18.1.8
Comments (1)
2025-06-02 12:40:48 Feoramund
This no longer crashes. Instead, it gives me this error:
4387/main.odin(6:2) Error: Extracting an element from a #simd array using .x syntax is disallowed, prefer `simd.extract` b.x = 10