Odin icon indicating copy to clipboard operation
Odin copied to clipboard

LLVM Error when accessing fields of const `any`

Open Airtz opened this issue 5 months ago • 0 comments

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

Compile error.

Current Behavior

Segfault.

Failure Information (for bugs)

Steps to Reproduce

package main

main :: proc() {
      a : any : 1
      b := a.data //or a.id
}

Failure Logs

LLVM Error:
Global variable initializer type does not match global variable type!
ptr @"ggv$main::main$1"

Segmentation fault (exit status 139)

Airtz avatar Jun 14 '25 18:06 Airtz