db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / optim / kill-stores1.c
blob16a5dcf0d34a62c9429499ff25dc471ad0dcb034
1 struct s {
2 int c[1];
3 };
5 static struct s x, y;
6 static int p;
8 static void foo0(void)
10 (x = y).c; // x = y;
13 static void foo1(void)
15 int *t = (x = y).c; // x = y;
18 static void foo2(void)
20 (x = y).c + 1; // x = y;
23 static void foo3(void)
25 (x = y).c[0]; // x = y;
28 static void foo4(void)
30 (p ? x : y).c[0]; // ;
33 static void foo5(void)
35 (p, y).c[0]; // ;
39 * check-name: kill-stores1
40 * check-command: test-linearize -Wno-decl $file
42 * check-output-ignore
43 * check-output-pattern(4): load\\.
44 * check-output-pattern(4): load\\..*0\\[y\\]
45 * check-output-pattern(4): store\\.
46 * check-output-pattern(4): store\\..*0\\[x\\]
47 * check-output-excludes: select\\.