math: improve how get_absolute_min/max() work
[smatch.git] / validation / sm_math1.c
blob8764bb9118f1bcad3370e44b88165920546b9ad3
1 #include "check_debug.h"
3 int something();
5 void func(void)
7 int x = 3;
8 int y = 42;
9 int z = 7;
11 x--;
12 y -= 100;
13 __smatch_value("y");
14 while (something()) {
15 y++;
16 __smatch_value("y");
18 z += something();
19 __smatch_value("z");
20 __smatch_value("x");
21 label_I1:
22 x--;
23 __smatch_value("x");
24 goto label_I1;
27 * check-name: smatch math test #1
28 * check-command: smatch -I.. sm_math1.c
30 * check-output-start
31 sm_math1.c:13 func() y = (-58)
32 sm_math1.c:16 func() y = (-57)-max
33 sm_math1.c:19 func() z = 7-max
34 sm_math1.c:20 func() x = 2
35 sm_math1.c:23 func() x = min-1
36 * check-output-end