Bug 24651 – Bitfield layout wrong for 48-bit field on 32-bit Linux

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2024-07-06T13:23:28Z
Last change time
2024-07-06T23:36:43Z
Keywords
pull
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2024-07-06T13:23:28Z
``` struct S { unsigned long long a:48, b:48; }; ``` Struct S has different bitfield layout for C and D on 32-bit Linux: D: size=16 align=4 C: size=12 align=4 ulong a: D: FFFFFFFF FFFF0000 00000000 00000000 C: FFFFFFFF FFFF0000 00000000 ulong b: D: 00000000 00000000 FFFFFFFF FFFF0000 C: 00000000 0000FFFF FFFFFFFF
Comment #1 by dlang-bot — 2024-07-06T13:27:40Z
@tim-dlang created dlang/dmd pull request #16667 "Fix bugzilla 24651 - Bitfield layout wrong for 48-bit field on 32-bit…" fixing this issue: - Fix bugzilla 24651 - Bitfield layout wrong for 48-bit field on 32-bit Linux https://github.com/dlang/dmd/pull/16667
Comment #2 by dlang-bot — 2024-07-06T23:36:43Z
dlang/dmd pull request #16667 "Fix bugzilla 24651 - Bitfield layout wrong for 48-bit field on 32-bit…" was merged into master: - 88237709547f2e459e4b64e847d2ab3244ddad91 by Tim Schendekehl: Fix bugzilla 24651 - Bitfield layout wrong for 48-bit field on 32-bit Linux https://github.com/dlang/dmd/pull/16667