extra: cleanup: rename do_comparison_range() => do_comparison()
[smatch.git] / validation / sm_implied10.c
blob5b5ee5b86ccdd1c8b3123b153c0750a354a6cd0f
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.. sm_implied10.c
24 * check-output-start
25 sm_implied10.c +10 func(3) y = min-max
26 sm_implied10.c +12 func(5) y = min-(-1),1-max
27 sm_implied10.c +15 func(8) offset = min-max
28 sm_implied10.c +17 func(10) offset = min-9
29 * check-output-end