xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/init-local-array.c (revision b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f)
1 static int array(void)
2 {
3 	int a[2];
4 
5 	a[1] = 1;
6 	a[0] = 0;
7 	return a[1];
8 }
9 
10 static int sarray(void)
11 {
12 	struct {
13 		int a[2];
14 	} s;
15 
16 	s.a[1] = 1;
17 	s.a[0] = 0;
18 	return s.a[1];
19 }
20 
21 /*
22  * check-name: init local array
23  * check-command: test-linearize $file
24  * check-output-ignore
25  * check-output-excludes: load
26  * check-output-excludes: store
27  * check-output-pattern(2): ret.32 *\\$1
28  */
29