[Issue 23064] New: wrong code generated for bitfield assignment to ?:
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 27 22:18:00 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23064
Issue ID: 23064
Summary: wrong code generated for bitfield assignment to ?:
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The generated code is as if a.x and a.y were regular fields instead of
bitfields.
struct A { int x: 3; int y: 5; } a;
struct A test(int val, int choice, struct A a)
{
(choice ? a.x : a.y) = val;
return a;
}
Affects D and ImportC.
--
More information about the Digitalmars-d-bugs
mailing list