Bug 24613 – Bitfield with 64 bits always zero

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-06-16T17:10:00Z
Last change time
2024-12-13T19:35:47Z
Assigned to
No Owner
Creator
Tim
Moved to GitHub: dmd#18247 →

Comments

Comment #0 by tim.dlang — 2024-06-16T17:10:00Z
Values for a bitfield with 64 bits are not stored and remain 0. ``` struct S { ulong a:64; } void main() { S s; s.a = 1; assert(s.a == 1); // Fails: s.a is 0 } ``` This affects both ImportC and normal D with -preview=bitfields.
Comment #1 by robert.schadek — 2024-12-13T19:35:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18247 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB