xref: /illumos-gate/usr/src/tools/smatch/src/validation/linear/bitfield-expand-deref.c (revision 6a817834d81cc75ce12d0d393320837b1fec1e85)
1 struct s {
2 	int a:8;
3 	int b:8;
4 };
5 
6 int foo(void)
7 {
8 	struct s x = { .a = 12, .b = 34, };
9 
10 	return x.b;
11 }
12 
13 int bar(int a)
14 {
15 	struct s x = { .a = 12, .b = a, };
16 
17 	return x.b;
18 }
19 
20 /*
21  * check-name: bitfield expand deref
22  * check-command: test-linearize -Wno-decl $file
23  *
24  * check-output-ignore
25  * check-output-excludes: ret\\..*\\$12
26  * check-output-contains: ret\\..*\\$34
27  */
28