memcpy_overflow: handle array members better
[smatch.git] / validation / sm_compare2.c
blobe7ff80a102ac9cfb08ead1fa9da48d7becba5ba3
1 #include "check_debug.h"
3 int a, b, c;
5 int main(void)
7 if (a < 4)
8 return 1;
9 if (a > 10)
10 return 2;
11 __smatch_value("a");
13 if (b < 3)
14 return 3;
15 if (b > 15)
16 return 4;
17 __smatch_value("b");
19 if (b > a) {
20 __smatch_value("a");
21 __smatch_value("b");
22 } else {
23 __smatch_value("a");
24 __smatch_value("b");
26 return 5;
30 * check-name: Smatch Comparison #2
31 * check-command: smatch -I.. sm_compare2.c
33 * check-output-start
34 sm_compare2.c:11 main() a = 4-10
35 sm_compare2.c:17 main() b = 3-15
36 sm_compare2.c:20 main() a = 4-10
37 sm_compare2.c:21 main() b = 5-15
38 sm_compare2.c:23 main() a = 4-10
39 sm_compare2.c:24 main() b = 3-10
40 * check-output-end