about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-05-23 15:26:24 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-23 20:57:58 +0100
commit15d0d924d74f86457f9462a83c414067b6bfed2a (patch)
treeed41952451a61783c68283919aee00078308f46a /test
parent4e0ec744a8170f3d82aa1a8658fd523442781da2 (diff)
downloadklee-15d0d924d74f86457f9462a83c414067b6bfed2a.tar.gz
test: add parenthesis around & operands
Some compilers are picky, so avoid the warning by additional parentheses:
test/VectorInstructions/integer_ops_unsigned_symbolic.c:85:22: warning: & has lower precedence than <; < will be evaluated first [-Wparentheses]

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/VectorInstructions/integer_ops_unsigned_symbolic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/VectorInstructions/integer_ops_unsigned_symbolic.c b/test/VectorInstructions/integer_ops_unsigned_symbolic.c
index 21ac90ce..56b17398 100644
--- a/test/VectorInstructions/integer_ops_unsigned_symbolic.c
+++ b/test/VectorInstructions/integer_ops_unsigned_symbolic.c
@@ -59,6 +59,7 @@ int main() {
   ASSERT_ELV4(c, *, a, b);
 
   // Test division
+  // We do not use && on purpose = make klee fork exactly once
   if ((data[4] != 0) & (data[5] != 0) & (data[6] != 0) & (data[7] != 0)) {
     c = a / b;
     ASSERT_ELV4(c, /, a, b);
@@ -82,7 +83,8 @@ int main() {
   ASSERT_ELV4(c, ^, a, b);
 
   // Test left shift
-  if ((data[0]) < 32 & (data[1] < 32) & (data[2] < 32) & (data[3] < 32)) {
+  // no '&&', the same as above
+  if (((data[0]) < 32) & (data[1] < 32) & (data[2] < 32) & (data[3] < 32)) {
     c = b << a;
     ASSERT_ELV4(c, <<, b, a);