Bug 24262 – Assert error with bit fields

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2023-11-26T00:22:30Z
Last change time
2023-11-26T12:12:07Z
Keywords
pull
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2023-11-26T00:22:30Z
typedef struct { unsigned id : 15; _Bool done : 1; } Entry; typedef struct { Entry e; } State; void advance(unsigned i) { State s = (State){i}; } core.exception.AssertError@src/dmd/e2ir.d(6557): Assertion failure ---------------- ??:? _d_assertp [0x5630e3e241cc] src/dmd/e2ir.d:6557 dmd.backend.el.elem* dmd.e2ir.toElemStructLit(dmd.expression.StructLiteralExp, ref dmd.toir.IRState, dmd.tokens.EXP, dmd.backend.cc.Symbol*, bool) [0x5630e3cc6994] src/dmd/e2ir.d:4077 dmd.backend.el.elem* dmd.e2ir.toElem(dmd.expression.Expression, ref dmd.toir.IRState).visitStructLiteral(dmd.expression.StructLiteralExp) [0x5630e3cc047e] ...
Comment #1 by dlang-bot — 2023-11-26T05:59:51Z
@WalterBright created dlang/dmd pull request #15864 "fix Issue 24262 - Assert error with bit fields" fixing this issue: - fix Issue 24262 - Assert error with bit fields https://github.com/dlang/dmd/pull/15864
Comment #2 by dlang-bot — 2023-11-26T10:52:14Z
dlang/dmd pull request #15864 "fix Issue 24262 - Assert error with bit fields" was merged into stable: - 6c383c1c71c6423766d8f8827fc1dc0db78c1f27 by Walter Bright: fix Issue 24262 - Assert error with bit fields https://github.com/dlang/dmd/pull/15864
Comment #3 by dlang-bot — 2023-11-26T12:12:07Z
dlang/dmd pull request #15865 "Merge stable into master" was merged into master: - ec34292ead8bb30bae9f779326c0931238c70e75 by Walter Bright: fix Issue 24262 - Assert error with bit fields (#15864) https://github.com/dlang/dmd/pull/15865