odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
7.01k stars 621 forks source link

Compiler segfault on abs(no_return_value()) #4508

Closed dayllenger closed 11 hours ago

dayllenger commented 2 days ago

Context

Odin:    dev-2024-11:e607cbe93
OS:      Arch Linux, Linux 6.6.60-1-lts
CPU:     Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
RAM:     7686 MiB
Backend: LLVM 18.1.8

Steps to Reproduce

package main

main :: proc() {
    p :: proc() {}
    abs(p())
}
$ odin build .
segmentation fault (core dumped)

Also fails with min, max, and some other builtin functions.

Kelimion commented 12 hours ago

Fixed in #4516. I'm looking over other builtins before I merge it.