Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM Backend crashes with .? operator. #4422

Open
marcs-feh opened this issue Oct 26, 2024 · 0 comments
Open

LLVM Backend crashes with .? operator. #4422

marcs-feh opened this issue Oct 26, 2024 · 0 comments

Comments

@marcs-feh
Copy link
Contributor

Context

Odin:    dev-2024-10
OS:      Arch Linux, Linux 6.6.52-1-lts
CPU:     Intel(R) Celeron(R) N4020 CPU @ 1.10GHz
RAM:     3471 MiB
Backend: LLVM 18.1.6

Expected Behavior

This should either be a valid code or yield an informative compiler error.

package what

Foo :: union {
	int, f32, rune,
}

main :: proc(){
	x : Foo = int(100)
	y : int = x.?
}

Current Behavior

The LLVM backend crashes with a panic.

Failure Information (for bugs)

NOT FOUND lb_type_info_index:
        uint
        @ index 131
        max count: 6
Found:
        Foo
        any
        rune
        f32
        u64
        union {int, f32, rune}
src/llvm_backend_type.cpp(17): Panic: NOT FOUND

Steps to Reproduce

  1. Create new .odin file and paste the code above
  2. Just do odin run <TheFile>.odin -file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants