fill_db_untrusted: follow untrusted data down the call tree
[smatch.git] / validation / sm_equiv2.c
blob3e621f57ffe7505277bd89afc40b53c97aec6041
1 #include "check_debug.h"
3 int *something();
5 int red;
6 int blue;
7 int x;
8 int func(void)
10 red = 0;
12 if (x) {
13 red = 5;
15 blue = red;
17 if (x) {
18 __smatch_value("red");
19 __smatch_value("blue");
21 __smatch_value("red");
22 __smatch_value("blue");
23 return 0;
26 * check-name: smatch equivalent variables #2 (implications)
27 * check-command: smatch -I.. sm_equiv2.c
29 * check-output-start
30 sm_equiv2.c +18 func(10) red = 5
31 sm_equiv2.c +19 func(11) blue = 5
32 sm_equiv2.c +21 func(13) red = 0,5
33 sm_equiv2.c +22 func(14) blue = 0,5
34 * check-output-end