param_used: fix use after free
[smatch.git] / validation / sm_implied18.c
blobdb148c916c8bbb11e3429ae86308be111cf01b61
1 #include "check_debug.h"
3 int a, b;
5 int frob(int *data)
7 if (a)
8 return 0;
9 if (b)
10 return -1;
11 *data = 42;
12 return 1;
15 void test(void)
17 int x = -1;
18 int ret;
20 ret = frob(&x);
21 if (ret < 0)
22 return;
23 if (ret == 0)
24 return;
25 __smatch_implied(x);
29 * check-name: smatch implied #18
30 * check-command: smatch -I.. sm_implied18.c
32 * check-output-start
33 sm_implied18.c:25 test() implied: x = '42'
34 * check-output-end