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: [email protected]
Reporter: [email protected]
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.
--