Odin
Odin copied to clipboard
LLVM-backend panics when resolving nested `#subtype`s
Context
Odin: dev-2025-04-nightly:d9f990d
OS: Windows 10 Professional (version: 22H2), build 19045.5487
CPU: AMD Ryzen 7 6800H with Radeon Graphics
RAM: 15612 MiB
Backend: LLVM 20.1.0
Expected Behavior
Compiles.
Current Behavior
LLVM-backend panics.
Failure Information (for bugs)
Steps to Reproduce
package main
A :: struct {int}
B :: struct {#subtype A}
C :: struct {#subtype B}
p :: proc(a: A) {}
main :: proc() {
c: C = {{{1}}}
p(c)
}
Failure Logs
main.main
lb_emit_conv: src -> dst
Not Identical C != A
Not Identical struct {_: B} != struct {_: int}
Not Identical 707616738e90 != 707616734ad0
Not Identical 707616738f30 != 707616734b70
src/llvm_backend_expr.cpp(2494): Panic: Invalid type conversion: 'C' to 'A' for procedure 'main.main'
Program terminated with signal: SIGILL
Compiler returned: 132