aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/bitfield-expand-deref.c
blob: 7748725fcef3a3c53d55fd47cb50b2f538d38e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
struct s {
	int a:8;
	int b:8;
};

int foo(void)
{
	struct s x = { .a = 12, .b = 34, };

	return x.b;
}

int bar(int a)
{
	struct s x = { .a = 12, .b = a, };

	return x.b;
}

/*
 * check-name: bitfield expand deref
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-excludes: ret\..*\$12
 * check-output-contains: ret\..*\$34
 */