extra: fix bug handling untracked pointers
[smatch.git] / validation / sm_implied15.c
blob5aee5873576cb71cd59a35f162b456c2b29f2b54
1 #include "check_debug.h"
3 int some_func(void);
5 int a;
6 int frob(int *p)
8 int ret = 0;
10 *p = 4;
11 if (a)
12 goto out;
14 *p = some_func();
15 if (*p < 10 || *p > 100) {
16 ret = -12;
17 goto out;
20 out:
21 return ret;
24 void test(void)
26 int var = 0;
27 int ret;
29 ret = frob(&var);
30 __smatch_implied(var);
31 if (ret)
32 return;
33 __smatch_implied(var);
36 * check-name: smatch implied #15
37 * check-command: smatch -I.. sm_implied15.c
39 * check-output-start
40 sm_implied15.c:30 test() implied: var = 's32min-s32max'
41 sm_implied15.c:33 test() implied: var = '4,10-100'
42 * check-output-end