-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
non byte-aligned nested packed structs #16748
Copy link
Copy link
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.
Milestone
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.
Zig Version
0.12.0-dev.29+d1788ecdd
Steps to Reproduce and Observed Behavior
Expected Behavior
To my understanding of https://ziglang.org/documentation/0.11.0/#packed-struct, the test should pass and ptr_p_b should be a simple *u8.
My guess is that maybe the issue is somewhere around the internal representation of the pointer in
Sema.structFieldPtrByIndex():