Skip to content

Unable to access members of a using substruct with #soa #2614

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

Open
ftphikari opened this issue Jun 30, 2023 · 0 comments
Open

Unable to access members of a using substruct with #soa #2614

ftphikari opened this issue Jun 30, 2023 · 0 comments
Labels

Comments

@ftphikari
Copy link
Contributor

Context

  • Operating System & Odin Version:

      Odin: dev-2023-06:
      OS:   Windows 11 Professional (version: 22H2), build 22621.1702
      CPU:  Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
      RAM:  9938 MiB
    

Code

package bug3

Thing :: struct {
	a: int,
	using B: struct {
		b: uint,
		c: rawptr,
	}
}

main :: proc() {
	things := make_soa(#soa[dynamic]Thing, 1)
	thing := &things[0]
	c := thing.c
}

Current Behavior

Odin\src\llvm_backend_utility.cpp(1064): Assertion Failure: `is_type_pointer(s.type)`

If b and c are swapped places in the struct definition then I get:

Odin\src\llvm_backend_utility.cpp(1138): Panic: TODO(bill): struct_gep type: rawptr, 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant