xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/struct.c (revision 71815ce76261aa773c97600750fdce92334d1990)
1 struct s {
2 	int a;
3 	int b;
4 };
5 
6 int f0(void)
7 {
8 	struct s s;
9 
10 	s.a = 0;
11 	s.b = 1;
12 
13 	return s.a;
14 }
15 
16 int f1(void)
17 {
18 	struct s s;
19 
20 	s.a = 1;
21 	s.b = 0;
22 
23 	return s.b;
24 }
25 
26 /*
27  * check-name: struct
28  * check-command: test-linearize -Wno-decl $file
29  *
30  * check-output-ignore
31  * check-output-pattern(2): ret.32 *\\$0
32  */
33