helper: strip out the byte swaps in strip_expr()
[smatch.git] / validation / sm_loops2.c
blob7fcf417b8aa4021e933dd9f1568eb4657698fdc3
1 #include "check_debug.h"
3 int checker(void);
5 int x;
6 int y;
7 void func(void)
9 while (x--)
10 __smatch_value("x");
11 __smatch_value("x");
12 for (x = 0; x < y; x++) {
13 if (checker())
14 break;
16 __smatch_value("x");
17 while (x--)
18 __smatch_value("x");
19 __smatch_value("x");
20 x = 10;
21 while (x--)
22 __smatch_value("x");
23 __smatch_value("x");
24 x = 10;
25 while (--x)
26 __smatch_value("x");
27 __smatch_value("x");
30 * check-name: smatch loops #1
31 * check-command: smatch -I.. sm_loops2.c
33 * check-output-start
34 sm_loops2.c:10 func() x = s32min-s32max
35 sm_loops2.c:11 func() x = s32min-s32max
36 sm_loops2.c:16 func() x = 0-s32max
37 sm_loops2.c:18 func() x = 0-s32max
38 sm_loops2.c:19 func() x = (-1)
39 sm_loops2.c:22 func() x = 0-9
40 sm_loops2.c:23 func() x = (-1)
41 sm_loops2.c:26 func() x = 1-9
42 sm_loops2.c:27 func() x = 0
43 * check-output-end