aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/packed-bitfield4.c
blob: 0342b2414b6eda43da16deb54f78b39c1ef028e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#define __packed __attribute__((packed))

typedef __UINT32_TYPE__ u32;

struct s {
	u32	f:24;
} __packed;
_Static_assert(sizeof(struct s) == 3);

static int ld(struct s *s)
{
	return s->f;
}

/*
 * check-name: packed-bitfield4
 * check-description: Is check_access() OK with short packed bitfields?
 * check-known-to-fail
 */