xref: /illumos-gate/usr/src/tools/smatch/src/validation/optim/live-stores0.c (revision 8222814ef8560ee0ba222eca8ca5acffc6cd0e44)
1 void init(int *x);
2 
3 static int foo(void)
4 {
5 	int a[2] = { 0, 123, };
6 
7 	if (a[1] != 123)
8 		return 1;
9 	init(a);
10 	if (a[1] == 123)
11 		return 2;
12 	return 0;
13 }
14 
15 #if 0
16 void init(int *x)
17 {
18 	x[0] = x[1] = 0;
19 }
20 #endif
21 
22 /*
23  * check-name: live-stores
24  * check-command: test-linearize $file
25  *
26  * check-output-ignore
27  * check-output-contains: store.32 *\\$123
28  * check-output-pattern(2,3): store\\.
29  */
30