1*1f5207b7SJohn Levon #include <stdio.h>
2*1f5207b7SJohn Levon #include <string.h>
3*1f5207b7SJohn Levon #include "check_debug.h"
4*1f5207b7SJohn Levon 
frob(int * x)5*1f5207b7SJohn Levon int frob(int *x)
6*1f5207b7SJohn Levon {
7*1f5207b7SJohn Levon 	*x = *x * 3;
8*1f5207b7SJohn Levon 	return 0;
9*1f5207b7SJohn Levon }
10*1f5207b7SJohn Levon 
11*1f5207b7SJohn Levon int *x;
main(void)12*1f5207b7SJohn Levon int main(void)
13*1f5207b7SJohn Levon {
14*1f5207b7SJohn Levon 	frob(x);
15*1f5207b7SJohn Levon 	if (x)
16*1f5207b7SJohn Levon 		return 1;
17*1f5207b7SJohn Levon 	return 0;
18*1f5207b7SJohn Levon }
19*1f5207b7SJohn Levon 
20*1f5207b7SJohn Levon 
21*1f5207b7SJohn Levon /*
22*1f5207b7SJohn Levon  * check-name: smatch: inline #2
23*1f5207b7SJohn Levon  * check-command: smatch -I.. sm_inline2.c
24*1f5207b7SJohn Levon  *
25*1f5207b7SJohn Levon  * check-output-start
26*1f5207b7SJohn Levon sm_inline2.c:15 main() warn: variable dereferenced before check 'x' (see line 14)
27*1f5207b7SJohn Levon  * check-output-end
28*1f5207b7SJohn Levon  */
29