1 #define __packed __attribute__((packed))
2 
3 typedef unsigned char   u8;
4 typedef __UINT16_TYPE__ u16;
5 typedef __UINT32_TYPE__ u32;
6 typedef __UINT64_TYPE__ u64;
7 
8 struct b {
9 	u32	a:1;
10 	u32	b:2;
11 	u32	c:4;
12 	u32	d:8;
13 	u32	e:16;
14 } __packed;
15 _Static_assert(__alignof(struct b) == 1);
16 _Static_assert(   sizeof(struct b) == 4);
17 
18 struct c {
19 	u8	a;
20 	u8	b;
21 	u64	c:48;
22 } __packed;
23 _Static_assert(__alignof(struct c) == 1);
24 _Static_assert(   sizeof(struct c) == 8);
25 
26 /*
27  * check-name: packed-bitfield3
28  */
29