*new* check_macros: find macro precedence bugs
[smatch.git] / validation / sm_math1.c
blobe6d9cc3f5fa6e9b445c4ec6f7337d3491dedbddf
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(8) y = (-58)
32 sm_math1.c +16 func(11) y = (-57)-max
33 sm_math1.c +19 func(14) z = 7-max
34 sm_math1.c +20 func(15) x = 2
35 sm_math1.c +23 func(18) x = min-1
36 * check-output-end