function_hooks/unwind: introduce return_implies_exact()
[smatch.git] / validation / sm_loops6.c
blob1bc9983054a2a568188753a5da1c45812df20fa7
1 #include "check_debug.h"
3 extern int xxx;
5 int test(struct bar *bar)
7 int a = 10, b = 10, c = 10, d = 10, e = 10;
9 while (a--)
10 __smatch_implied(a);
11 __smatch_implied(a);
13 while (--b)
14 __smatch_implied(b);
15 __smatch_implied(b);
17 while (--c >= 0)
18 __smatch_implied(c);
19 __smatch_implied(c);
21 while (d-- >= 0)
22 __smatch_implied(d);
23 __smatch_implied(d);
25 while (e-- >= 0) {
26 if (xxx)
27 break;
28 __smatch_implied(e);
30 __smatch_implied(e);
32 return 0;
37 * check-name: smatch loops #6
38 * check-command: smatch -I.. sm_loops6.c
40 * check-output-start
41 sm_loops6.c:10 test() implied: a = '0-9'
42 sm_loops6.c:11 test() implied: a = '(-1)'
43 sm_loops6.c:14 test() implied: b = '1-9'
44 sm_loops6.c:15 test() implied: b = '0'
45 sm_loops6.c:18 test() implied: c = '0-9'
46 sm_loops6.c:19 test() implied: c = '(-1)'
47 sm_loops6.c:22 test() implied: d = '(-1)-9'
48 sm_loops6.c:23 test() implied: d = '(-2)'
49 sm_loops6.c:28 test() implied: e = '(-1)-9'
50 sm_loops6.c:30 test() implied: e = '(-2)-9'
51 * check-output-end