Skip to content

Comparing ^#soa[dynamic]T is unhandled #5104

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

Closed
Kelimion opened this issue May 2, 2025 · 1 comment
Closed

Comparing ^#soa[dynamic]T is unhandled #5104

Kelimion opened this issue May 2, 2025 · 1 comment
Labels
bug llvm-backend replicated We were able to replicate the bug.

Comments

@Kelimion
Copy link
Member

Kelimion commented May 2, 2025

Context

Odin:    dev-2025-05:19fe75f02
OS:      Windows 10 Professional (version: 22H2), build 19045.5247
CPU:     AMD Ryzen 9 5950X 16-Core Processor
RAM:     65444 MiB
Backend: LLVM 20.1.0

Expected Behavior

For the comparison to work, or an error message.

Current Behavior

W:\Odin\src\llvm_backend_expr.cpp(3213): Panic: Unknown handled type: #soa ^#soa[dynamic]Foo -> #soa ^#soa[dynamic]Foo

Steps to Reproduce

Compile the following.

package scratch

import "core:fmt"

Foo :: struct {a, b: int}

main :: proc() {
	array := new(#soa[dynamic]Foo)
	array^ = make(#soa[dynamic]Foo, 12, 12)

	addr := &array[1]
	if addr == nil { // This crashes the compiler
		fmt.println("Uhoh")
	}
	fmt.println(array)
}

Failure Logs

Please include any relevant log snippets or files here.

@Kelimion Kelimion added bug llvm-backend replicated We were able to replicate the bug. labels May 2, 2025
@bogwi bogwi mentioned this issue May 6, 2025
@Kelimion
Copy link
Member Author

Kelimion commented May 6, 2025

Fixed by @bogwi's patch #5123.

@Kelimion Kelimion closed this as completed May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug llvm-backend replicated We were able to replicate the bug.
Projects
None yet
Development

No branches or pull requests

1 participant