aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cse-not02.c
diff options
Diffstat (limited to 'validation/optim/cse-not02.c')
-rw-r--r--validation/optim/cse-not02.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/validation/optim/cse-not02.c b/validation/optim/cse-not02.c
new file mode 100644
index 00000000..70addebc
--- /dev/null
+++ b/validation/optim/cse-not02.c
@@ -0,0 +1,11 @@
+int and(int a, int b) { return ((a == b) & (a != b)) == 0; }
+int ior(int a, int b) { return ((a == b) | (a != b)) == 1; }
+int xor(int a, int b) { return ((a == b) ^ (a != b)) == 1; }
+
+/*
+ * check-name: cse-not02
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-returns: 1
+ */