xref: /illumos-gate/usr/src/tools/smatch/src/validation/optim/missing-select.c (revision cd61ae21816e53b94bc1673f3f1aa651fc3115e8)
1 static int foo(int **g)
2 {
3 	int i = 1;
4 	int *a[2];
5 	int **p;
6 
7 	a[1] = &i;
8 	if (g)
9 		p = g;
10 	else
11 		p = &a[0];
12 	if (!g)
13 		**p = 0;
14 	return i;
15 }
16 
17 /*
18  * check-name: missing-select
19  * check-command: test-linearize -Wno-decl $file
20  *
21  * check-output-ignore
22  * check-output-contains: select\\.
23  */
24