deref_check: silence some false positives
[smatch.git] / validation / sm_implied10.c
blob2fc41fe032d42cc02ec0b151954ba164692be642
1 #include "check_debug.h"
3 void frob(void){}
5 int x[10];
6 int offset;
7 void func(int *y)
9 if (({int test2 = !!(!y || !*y); frob(); frob(); frob(); test2;}))
10 __smatch_value("y");
11 else
12 __smatch_value("y");
14 if (({int test2 = !!(offset >= 10 || x[offset] == 1); frob(); frob(); frob(); test2;}))
15 __smatch_value("offset");
16 else
17 __smatch_value("offset");
21 * check-name: smatch implied #10
22 * check-command: smatch -I.. -m64 sm_implied10.c
24 * check-output-start
25 sm_implied10.c:10 func() y = 0,4096-2117777777777777777
26 sm_implied10.c:12 func() y = 4096-2117777777777777777
27 sm_implied10.c:15 func() offset = s32min-s32max
28 sm_implied10.c:17 func() offset = s32min-9
29 * check-output-end