1 #include "check_debug.h"
2 
3 int a, b;
4 
frob(int * data)5 int frob(int *data)
6 {
7 	if (a)
8 		return 0;
9 	if (b)
10 		return -1;
11 	*data = 42;
12 	return 1;
13 }
14 
test(void)15 void test(void)
16 {
17 	int x = -1;
18 	int ret;
19 
20 	ret = frob(&x);
21 	if (ret < 0)
22 		return;
23 	if (ret == 0)
24 		return;
25 	__smatch_implied(x);
26 }
27 
28 /*
29  * check-name: smatch implied #18
30  * check-command: smatch -I.. sm_implied18.c
31  *
32  * check-output-start
33 sm_implied18.c:25 test() implied: x = '42'
34  * check-output-end
35  */
36