Bug 23649 – Incorrect alignof for struct member field

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-01-22T21:52:22Z
Last change time
2024-12-13T19:26:52Z
Keywords
industry
Assigned to
No Owner
Creator
johanengelen
Moved to GitHub: dmd#20218 →

Comments

Comment #0 by johanengelen — 2023-01-22T21:52:22Z
Testcase: ``` struct S { byte i; align(1) long member_field; } void foo( S* d) { pragma(msg, d.member_field.alignof); // prints 8UL instead of 1UL } ``` The align(1) on `member_field` is ignored when querying .alignof.
Comment #1 by robert.schadek — 2024-12-13T19:26:52Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20218 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB