summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Li <sparse@chrisli.org>2009-10-28 22:41:26 +0000
committerChristopher <sparse@chrisli.org>2010-03-28 17:51:36 -0700
commitdb9ce95814d556141df003f2a5c0fa77bb78ede4 (patch)
treebaccef019cc846780fd5527539e94f549cd07089
parentFix incorrect linearization of "x && y && z" (diff)
downloadsparse-db9ce95814d556141df003f2a5c0fa77bb78ede4.tar.gz
sparse-db9ce95814d556141df003f2a5c0fa77bb78ede4.tar.bz2
sparse-db9ce95814d556141df003f2a5c0fa77bb78ede4.zip
Adding test case for "x && y && z" .
Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--validation/logical.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/validation/logical.c b/validation/logical.c
new file mode 100644
index 0000000..3f97522
--- /dev/null
+++ b/validation/logical.c
@@ -0,0 +1,17 @@
+extern int a(void);
+extern int b(void);
+extern int c(void);
+
+static int or(void)
+{
+ return a() || b() || c();
+}
+
+static int and(void)
+{
+ return a() && b() && c();
+}
+/*
+ * check-name: Logical and/or
+ */
+