4 unsigned int : 30, a
: 20;
8 unsigned int a
: 1, : 11, : 12, b
: 20;
12 unsigned int : 13, : 9, a
: 1, b
: 1, c
: 5, d
: 1, e
: 20;
17 unsigned int : 30, a
: 20;
20 struct BitfieldsInStructInUnion
{
37 // In order to reproduce the crash for this case we need the
38 // members of fields to stay private :-(
39 friend struct BitfieldsInStructInUnion
;
46 BitfieldsInStructInUnion() {
59 } bitfields_in_struct_in_union
;
66 class Derived
: public Base
{
71 union UnionWithBitfields
{
78 union UnionWithUnnamedBitfield
{
79 unsigned int : 16, a
: 24;
91 virtual ~WithVTable() {}
96 WithVTable with_vtable
;
98 struct WithVTableAndUnnamed
{
99 virtual ~WithVTableAndUnnamed() {}
104 WithVTableAndUnnamed with_vtable_and_unnamed
;
106 struct BaseWithVTable
{
107 virtual ~BaseWithVTable() {}
109 struct HasBaseWithVTable
: BaseWithVTable
{
114 HasBaseWithVTable base_with_vtable
;
116 struct DerivedWithVTable
: public Base
{
117 virtual ~DerivedWithVTable() {}
120 DerivedWithVTable derived_with_vtable
;
122 int main(int argc
, char const *argv
[]) {
143 uwubf
.x
= 0xFFFFFFFF;
155 with_vtable_and_unnamed
.b
= 0;
156 with_vtable_and_unnamed
.c
= 5;
158 base_with_vtable
.a
= 5;
159 base_with_vtable
.b
= 0;
160 base_with_vtable
.c
= 5;
162 derived_with_vtable
.b_a
= 2;
163 derived_with_vtable
.a
= 1;
165 return 0; // break here