Compiler assertion failure about invalid SIMD transmute when using struct literal in `append`.
dlandahl opened this issue · 3 comments
dlandahl commented
Context
On Manjaro linux, compiler version 0.13.0 (also happens on nightly 20-08-02)
Expected Behavior
Expecting either a compilation error or compilation success, depending on whether this should be allowed
Current Behavior
Compiler crash
Steps to Reproduce
odin build
the following:
package test
Thing :: struct {
a, b, c: f32,
}
main :: proc() {
things: [dynamic]Thing;
defer delete(things);
a : f32 = 1;
b : f32 = 2;
c : f32 = 3;
append(&things, Thing { a, b, c });
}
Failure Logs
src/ir.cpp(6074): Assertion Failure: sz == dz
Invalid transmute conversion: 'Thing' to 'struct {: #simd[2]f32, : f32}'
Illegal instruction (core dumped)
Tetralux commented
That's odd. I'm surprised we haven't noticed this one. Maybe it was caused recently