| Issue |
87227
|
| Summary |
ICE due to new bitfield algorithm (PR65742)
|
| Labels |
new issue
|
| Assignees |
urnathan
|
| Reporter |
urnathan
|
Sadly, PR65742 (commit 49839f97d295) introduced a bug for a corner case of vbase placement:
```
struct __attribute__((aligned(4))) Empty {} empty;
struct Char { char a; } cbase;
struct D : virtual Char {
[[no_unique_address]] Empty e0;
[[no_unique_address]] Empty e1;
unsigned a : 24; // keep as 24bits
} d;
```
in the complete D, the Char vbase is placed 3 bytes after the vptr (i.e. at offset 7 or 11), so the bitfield must remain 24-bits. We need dsize to limit the bitfield expansion, not nvsize. They're nearly always the same, except for cases like this involving multiple zero-sized members (or bases).
I will shortly be posting a patch to address this. (FWIW, I don't expect the triggering cases to be at all common).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs