*new* memset: check for memset(x, y, 0); typos
[smatch.git] / validation / sm_equiv3.c
blob1eb38d991d34c0ea2e641633cedc9281c37a4b35
1 #include "check_debug.h"
3 int *something();
4 void frob();
6 int red;
7 int blue;
8 int x;
9 int func(void)
12 red = something();
13 if (x < 4)
14 red = something();
15 else if (x > 5)
16 red = 0;
18 blue = red;
19 red = 0;
20 if (!blue)
21 return;
22 __smatch_value("red");
23 __smatch_value("blue");
24 return 0;
27 * check-name: smatch equivalent variables #3
28 * check-command: smatch -I.. sm_equiv3.c
30 * check-output-start
31 sm_equiv3.c +22 func(13) red = 0
32 sm_equiv3.c +23 func(14) blue = min-(-1),1-max
33 * check-output-end