Since n is not a pointer, this should be a semantic error.
Comment #2 by dkorpel — 2023-11-24T08:38:19Z
Looks like dustmite found another bug by reducing away the star from the type. Filed as issue 24259. Fixed test case:
```
typedef struct
{
unsigned : 15;
_Bool done : 1;
} S;
_Bool advance()
{
S *n;
if (n->done) {}
}
```
Comment #3 by bugzilla — 2023-11-24T22:43:54Z
This is not an ImportC specific bug, the same code in D exhibits the same failure:
struct S
{
uint : 15;
bool done : 1;
}
void advance()
{
S n;
if (n.done) {}
}
Comment #4 by dlang-bot — 2023-11-25T04:21:36Z
@WalterBright created dlang/dmd pull request #15861 "fix Issue 24257 - ImportC: ICE on accessing last _Bool bitfield" fixing this issue:
- fix Issue 24257 - ImportC: ICE on accessing last _Bool bitfield
https://github.com/dlang/dmd/pull/15861
Comment #5 by dlang-bot — 2023-11-25T21:45:37Z
dlang/dmd pull request #15861 "fix Issue 24257 - ImportC: ICE on accessing last _Bool bitfield" was merged into stable:
- 80dcf2c00e8e086a8c78a336e714a00f73c63ffd by Walter Bright:
fix Issue 24257 - ImportC: ICE on accessing last _Bool bitfield
https://github.com/dlang/dmd/pull/15861
Comment #6 by dlang-bot — 2023-11-26T12:12:06Z
dlang/dmd pull request #15865 "Merge stable into master" was merged into master:
- e1197fc765d0b94470a96f8655e9e2d7d8267a66 by Walter Bright:
fix Issue 24257 - ImportC: ICE on accessing last _Bool bitfield (#15861)
https://github.com/dlang/dmd/pull/15865