From 15d0d924d74f86457f9462a83c414067b6bfed2a Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 23 May 2018 15:26:24 +0200 Subject: 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 --- test/VectorInstructions/integer_ops_unsigned_symbolic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') 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); -- cgit 1.4.1