Odin icon indicating copy to clipboard operation
Odin copied to clipboard

min(type),max(type) in global array initializer yields LLVM error

Open reluctant-git-user opened this issue 1 year ago • 1 comments

Context

a:[1]i32=max(i32) // a:[1]i32={max(i32)} does work but this does not
main::proc() { a[0]=0 }
  • Operating System & Odin Version:

      Odin:    dev-2024-05-nightly:2250eb3e7
      OS:      Windows 11 Home Basic (version: 23H2), build 22631.3593
      CPU:     AMD Ryzen 5 5600X 6-Core Processor
      RAM:     16310 MiB
      Backend: LLVM 17.0.1
    

Expected Behavior

Program would compile without errors

Current Behavior

LLVM Error: Global variable initializer type does not match global variable type!

Steps to Reproduce

Compile the provided program

reluctant-git-user avatar May 22 '24 23:05 reluctant-git-user

Confirmed.

Kelimion avatar May 23 '24 08:05 Kelimion