aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-02-16 05:56:54 +0100
committerChristopher Li <sparse@chrisli.org>2017-02-16 20:43:03 +0800
commit1d696811811604532c2eb42d82573189e780f0ae (patch)
tree0c51ead215e8c460ed737a3e87d9d3a34084d197 /validation
parentf3e9e7da079b09432a7e087757265fed305ad2ba (diff)
downloadsparse-dev-1d696811811604532c2eb42d82573189e780f0ae.tar.gz
add killing of OP_PHISOURCEs
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
-rw-r--r--validation/kill-phisrc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/validation/kill-phisrc.c b/validation/kill-phisrc.c
new file mode 100644
index 00000000..f00dbed2
--- /dev/null
+++ b/validation/kill-phisrc.c
@@ -0,0 +1,21 @@
+int foo(int a, int b)
+{
+ int r = a + b;
+
+ if (a && 0) {
+ int s = r;
+ if (b)
+ s = 0;
+ (void) s;
+ }
+
+ return 0;
+}
+
+/*
+ * check-name: kill-phisrc
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-excludes: add\\.
+ */