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
Odin: dev-2025-02:584fdc0d4
OS: Windows 11 Professional (version: 24H2), build 26100.3194
CPU: 12th Gen Intel(R) Core(TM) i5-12600
RAM: 32540 MiB
Backend: LLVM 18.1.8
Current Behavior
The LLVM backend of the compiler crashes on an assertion, when type-asserting a union value in a ambiguous switch case.
It will not crash if we do not take a reference to the value.
package main
Foo :: union { int, bool }
main :: proc() {
foo : Foo = trueswitch &v in foo {
// ^ If we don't take a reference its fine.caseint, bool:
_ = v.(int)
}
}
Context
Current Behavior
The LLVM backend of the compiler crashes on an assertion, when type-asserting a union value in a ambiguous switch case.
It will not crash if we do not take a reference to the value.
Compiler Output
odin run .\repro.odin -file
C:\Odin\src\llvm_backend_general.cpp(1070): Assertion Failure: `is_type_pointer(value.type)` Foo
The text was updated successfully, but these errors were encountered: