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

Using all implicit swizzle fields on a array pointer causes CPP assertion. #3976

Closed
blob1807 opened this issue Jul 24, 2024 · 0 comments
Closed

Comments

@blob1807
Copy link
Contributor

Context

Odin: dev-2024-07:f6488383d
OS: Windows 11 Home Basic (version: 23H2), build 22631.3880
CPU: AMD Ryzen 7 6800HS with Radeon Graphics
RAM: 15608 MiB
Backend: LLVM 18.1.8

Current Behavior

Using all implicit swizzle fields on a pointer to an array with at least 2 fields, will cause

\src\llvm_backend_expr.cpp(5097): Assertion Failure: `is_type_array(expr->tav.type) || is_type_simd_vector(expr->tav.type)`

GB_ASSERT(is_type_array(expr->tav.type) || is_type_simd_vector(expr->tav.type));

Steps to Reproduce

package buggie

import "core:fmt"

main :: proc() {
    a := [3]int{1,2,3}
    p := &a
    p.rgb = p.bgr
    fmt.println(a)
}
  1. Copy Paste
  2. Run
  3. Profit...?
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