diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2023-10-30 11:59:29 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2024-02-08 13:17:19 +0000 |
commit | f9cb81fa27ca6ae4fef1c22081040071d20e4413 (patch) | |
tree | cae0000d0087ad36d51e554c20d684433089c8e9 /test/Expr | |
parent | 5371eb8474cc4dced751d0515c1ea9499d009668 (diff) | |
download | klee-f9cb81fa27ca6ae4fef1c22081040071d20e4413.tar.gz |
Assume C compiler's default standard is `-std=gnu17`
Newer compilers use `-std=gnu17` as the default when compiling C code. Fix all the test cases that violate this behaviour or explicitly request older standards `-std=c89` where necessary.
Diffstat (limited to 'test/Expr')
-rw-r--r-- | test/Expr/ReadExprConsistency.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Expr/ReadExprConsistency.c b/test/Expr/ReadExprConsistency.c index 9b794ee5..6429dc99 100644 --- a/test/Expr/ReadExprConsistency.c +++ b/test/Expr/ReadExprConsistency.c @@ -2,8 +2,9 @@ // RUN: rm -rf %t.klee-out // RUN: %klee --output-dir=%t.klee-out --exit-on-error %t.bc 2>%t.log // RUN: cat %t.log | FileCheck %s - +#include "klee/klee.h" #include <assert.h> +#include <stdio.h> /* This tests checks ensures that only relevant updates are present when doing @@ -15,7 +16,6 @@ https://github.com/klee/klee/issues/921 https://github.com/klee/klee/pull/1061 */ -void klee_print_expr(const char*, char); int main() { char arr[3]; char symbolic; @@ -25,12 +25,12 @@ int main() { char a = arr[2]; // (ReadExpr 2 arr) - //CHECK: arr[2]:(Read w8 2 arr) + // CHECK: arr[2]:(SExt w32 (Read w8 2 arr)) klee_print_expr("arr[2]", arr[2]); arr[1] = 0; char b = arr[symbolic]; // (ReadExpr symbolic [1=0]@arr) - //CHECK: arr[2]:(Read w8 2 arr) - //CHECK-NOT: arr[2]:(Read w8 2 [1=0]@arr) + // CHECK: arr[2]:(SExt w32 (Read w8 2 arr)) + // CHECK-NOT: arr[2]:(SExt w32 (Read w8 2 [1=0]@arr)) klee_print_expr("arr[2]", arr[2]); if(a == b) printf("Equal!\n"); |