about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2018-10-29 00:15:43 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-10-29 11:59:44 +0200
commit652c2bdc171a448a2d6082040eebec366946ad33 (patch)
tree1f49fdb4b9ec6b3c9aef060e609a6a2e289600ed
parent581dca9276cacc690703cd4962e309661fc71c23 (diff)
downloadklee-652c2bdc171a448a2d6082040eebec366946ad33.tar.gz
add %OOopt to recently added tests and Concrete
-rw-r--r--test/ArrayOpt/test-mix.c2
-rw-r--r--test/ArrayOpt/test_and.c2
-rw-r--r--test/ArrayOpt/test_array_index_array.c2
-rw-r--r--test/ArrayOpt/test_array_index_array_diffsize.c2
-rw-r--r--test/ArrayOpt/test_cache.c2
-rw-r--r--test/ArrayOpt/test_const_arr-idx.c2
-rw-r--r--test/ArrayOpt/test_expr_complex.c2
-rw-r--r--test/ArrayOpt/test_expr_simple.c2
-rw-r--r--test/ArrayOpt/test_feasible.c2
-rw-r--r--test/ArrayOpt/test_hybrid.c2
-rw-r--r--test/ArrayOpt/test_multindex.c2
-rw-r--r--test/ArrayOpt/test_new.c2
-rw-r--r--test/ArrayOpt/test_nier.c2
-rw-r--r--test/ArrayOpt/test_noncontiguous_idx.c2
-rw-r--r--test/ArrayOpt/test_position.c2
-rw-r--r--test/ArrayOpt/test_sub_idx.c2
-rw-r--r--test/ArrayOpt/test_var_idx.c2
-rw-r--r--test/Concrete/CMakeLists.txt5
-rw-r--r--test/Concrete/Makefile.cmake.test.in2
-rw-r--r--test/Feature/EscapingFunctions.c2
-rw-r--r--test/Feature/EscapingFunctionsAlias.c2
-rw-r--r--test/Runtime/FreeStanding/freestanding_only.c2
-rw-r--r--test/Runtime/POSIX/CanonicalizeFileName.c2
-rw-r--r--test/Runtime/POSIX/TestMain.c4
-rw-r--r--test/Runtime/POSIX/Usage.c2
-rw-r--r--test/regression/2018-05-17-replay-short-names.c2
-rw-r--r--test/regression/2018-10-01-double-segfault.c2
27 files changed, 32 insertions, 27 deletions
diff --git a/test/ArrayOpt/test-mix.c b/test/ArrayOpt/test-mix.c
index 3b3d7a0f..3c6b78e3 100644
--- a/test/ArrayOpt/test-mix.c
+++ b/test/ArrayOpt/test-mix.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_and.c b/test/ArrayOpt/test_and.c
index 310d2a9d..e8296678 100644
--- a/test/ArrayOpt/test_and.c
+++ b/test/ArrayOpt/test_and.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_array_index_array.c b/test/ArrayOpt/test_array_index_array.c
index cf852494..ec644c4b 100644
--- a/test/ArrayOpt/test_array_index_array.c
+++ b/test/ArrayOpt/test_array_index_array.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_array_index_array_diffsize.c b/test/ArrayOpt/test_array_index_array_diffsize.c
index 76ac08b2..30f8d96d 100644
--- a/test/ArrayOpt/test_array_index_array_diffsize.c
+++ b/test/ArrayOpt/test_array_index_array_diffsize.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_cache.c b/test/ArrayOpt/test_cache.c
index 2bc64fa4..903576b9 100644
--- a/test/ArrayOpt/test_cache.c
+++ b/test/ArrayOpt/test_cache.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_const_arr-idx.c b/test/ArrayOpt/test_const_arr-idx.c
index 9b8a7272..f567293d 100644
--- a/test/ArrayOpt/test_const_arr-idx.c
+++ b/test/ArrayOpt/test_const_arr-idx.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: not FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_expr_complex.c b/test/ArrayOpt/test_expr_complex.c
index ea2d8e52..45bfa4fb 100644
--- a/test/ArrayOpt/test_expr_complex.c
+++ b/test/ArrayOpt/test_expr_complex.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_expr_simple.c b/test/ArrayOpt/test_expr_simple.c
index 53af9a2b..ada1bd53 100644
--- a/test/ArrayOpt/test_expr_simple.c
+++ b/test/ArrayOpt/test_expr_simple.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_feasible.c b/test/ArrayOpt/test_feasible.c
index 1bbb341b..d2ad697c 100644
--- a/test/ArrayOpt/test_feasible.c
+++ b/test/ArrayOpt/test_feasible.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_hybrid.c b/test/ArrayOpt/test_hybrid.c
index ab7becf4..179169cd 100644
--- a/test/ArrayOpt/test_hybrid.c
+++ b/test/ArrayOpt/test_hybrid.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_multindex.c b/test/ArrayOpt/test_multindex.c
index 91519466..c6298d11 100644
--- a/test/ArrayOpt/test_multindex.c
+++ b/test/ArrayOpt/test_multindex.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: not FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_new.c b/test/ArrayOpt/test_new.c
index 8a66d1f6..3c4b221d 100644
--- a/test/ArrayOpt/test_new.c
+++ b/test/ArrayOpt/test_new.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: not FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_nier.c b/test/ArrayOpt/test_nier.c
index 40e36a3d..dd5e1b1b 100644
--- a/test/ArrayOpt/test_nier.c
+++ b/test/ArrayOpt/test_nier.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_noncontiguous_idx.c b/test/ArrayOpt/test_noncontiguous_idx.c
index 380c3aea..bcf4c169 100644
--- a/test/ArrayOpt/test_noncontiguous_idx.c
+++ b/test/ArrayOpt/test_noncontiguous_idx.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_position.c b/test/ArrayOpt/test_position.c
index fcf5aeaa..22aebc68 100644
--- a/test/ArrayOpt/test_position.c
+++ b/test/ArrayOpt/test_position.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_sub_idx.c b/test/ArrayOpt/test_sub_idx.c
index 34201274..116ad514 100644
--- a/test/ArrayOpt/test_sub_idx.c
+++ b/test/ArrayOpt/test_sub_idx.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/ArrayOpt/test_var_idx.c b/test/ArrayOpt/test_var_idx.c
index e9f159c1..c0428808 100644
--- a/test/ArrayOpt/test_var_idx.c
+++ b/test/ArrayOpt/test_var_idx.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --write-kqueries --output-dir=%t.klee-out --optimize-array=index %t.bc > %t.log 2>&1
 // RUN: FileCheck %s -input-file=%t.log -check-prefix=CHECK-OPT_I
diff --git a/test/Concrete/CMakeLists.txt b/test/Concrete/CMakeLists.txt
index b3e4948f..7fad17b9 100644
--- a/test/Concrete/CMakeLists.txt
+++ b/test/Concrete/CMakeLists.txt
@@ -6,4 +6,9 @@
 # License. See LICENSE.TXT for details.
 #
 #===------------------------------------------------------------------------===#
+if (${LLVM_VERSION_MAJOR} GREATER 4)
+  set(OZERO_OPT "-Xclang -disable-O0-optnone")
+else()
+  set(OZERO_OPT "-O0")
+endif()
 configure_file(Makefile.cmake.test.in Makefile.cmake.test @ONLY)
diff --git a/test/Concrete/Makefile.cmake.test.in b/test/Concrete/Makefile.cmake.test.in
index feb879de..2282bb08 100644
--- a/test/Concrete/Makefile.cmake.test.in
+++ b/test/Concrete/Makefile.cmake.test.in
@@ -13,7 +13,7 @@
 LLVMCC := @LLVMCC@
 LLVMAS := @LLVM_AS@
 LLVMLINK := @LLVM_LINK@
-LLVMCC.CFlags := -O0 -Wall
+LLVMCC.CFlags := @OZERO_OPT@ -Wall
 
 # Make sure source files can match the pattern rules
 VPATH := @CMAKE_CURRENT_SOURCE_DIR@
diff --git a/test/Feature/EscapingFunctions.c b/test/Feature/EscapingFunctions.c
index 83d8415a..f5791d76 100644
--- a/test/Feature/EscapingFunctions.c
+++ b/test/Feature/EscapingFunctions.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -emit-llvm -O0 -g -c %s -o %t.bc
+// RUN: %llvmgcc -emit-llvm %O0opt -g -c %s -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee -debug-print-escaping-functions --output-dir=%t.klee-out %t.bc 2> %t.log
 // RUN: FileCheck --input-file=%t.log %s
diff --git a/test/Feature/EscapingFunctionsAlias.c b/test/Feature/EscapingFunctionsAlias.c
index ca8f2f4f..f5e0fb11 100644
--- a/test/Feature/EscapingFunctionsAlias.c
+++ b/test/Feature/EscapingFunctionsAlias.c
@@ -1,6 +1,6 @@
 // Darwin does not support strong aliases.
 // REQUIRES: not-darwin
-// RUN: %llvmgcc -emit-llvm -O0 -g -c %s -o %t.bc
+// RUN: %llvmgcc -emit-llvm %O0opt -g -c %s -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee -debug-print-escaping-functions --output-dir=%t.klee-out %t.bc 2> %t.log
 // RUN: FileCheck --input-file=%t.log %s
diff --git a/test/Runtime/FreeStanding/freestanding_only.c b/test/Runtime/FreeStanding/freestanding_only.c
index 7bdf6c97..cb4c0fcb 100644
--- a/test/Runtime/FreeStanding/freestanding_only.c
+++ b/test/Runtime/FreeStanding/freestanding_only.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -emit-llvm -O0 -g -c  -D_FORTIFY_SOURCE=0 -o %t2.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -g -c  -D_FORTIFY_SOURCE=0 -o %t2.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out %t2.bc 2> %t.log
 // RUN: FileCheck %s --input-file=%t.log
diff --git a/test/Runtime/POSIX/CanonicalizeFileName.c b/test/Runtime/POSIX/CanonicalizeFileName.c
index 56b02327..8bba33d1 100644
--- a/test/Runtime/POSIX/CanonicalizeFileName.c
+++ b/test/Runtime/POSIX/CanonicalizeFileName.c
@@ -1,5 +1,5 @@
 // REQUIRES: not-darwin
-// RUN: %llvmgcc %s -Wall -emit-llvm -g -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -Wall -emit-llvm -g %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --libc=uclibc --posix-runtime --exit-on-error %t.bc
 
diff --git a/test/Runtime/POSIX/TestMain.c b/test/Runtime/POSIX/TestMain.c
index c91d4e36..79630fa0 100644
--- a/test/Runtime/POSIX/TestMain.c
+++ b/test/Runtime/POSIX/TestMain.c
@@ -1,8 +1,8 @@
 // Run applications with the posix environment but without additional arguments argc, argv for main
-// RUN: %llvmgcc -DMAIN1 %s -emit-llvm -O0 -c -g -o %t.bc
+// RUN: %llvmgcc -DMAIN1 %s -emit-llvm %O0opt -c -g -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime %t.bc | FileCheck %s -check-prefix=CHECK-MAIN1
-// RUN: %llvmgcc -DMAIN2 %s -emit-llvm -O0 -c -g -o %t.bc
+// RUN: %llvmgcc -DMAIN2 %s -emit-llvm %O0opt -c -g -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime %t.bc | FileCheck %s -check-prefix=CHECK-MAIN2
 #ifdef MAIN1
diff --git a/test/Runtime/POSIX/Usage.c b/test/Runtime/POSIX/Usage.c
index 40a0c902..babf2ddd 100644
--- a/test/Runtime/POSIX/Usage.c
+++ b/test/Runtime/POSIX/Usage.c
@@ -1,6 +1,6 @@
 // This test checks for the (in)correct use of --sym-files and --sym-args
 
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 
 // RUN: not %klee --output-dir=%t.klee-out --exit-on-error --posix-runtime %t.bc --sym-files 1 10 --sym-files 2 10 &> %t1
diff --git a/test/regression/2018-05-17-replay-short-names.c b/test/regression/2018-05-17-replay-short-names.c
index c0b9023f..0cab0632 100644
--- a/test/regression/2018-05-17-replay-short-names.c
+++ b/test/regression/2018-05-17-replay-short-names.c
@@ -1,7 +1,7 @@
 // RUN: rm -rf a
 // RUN: mkdir a
 // RUN: touch a/b
-// RUN: %llvmgcc %s -emit-llvm -O0 -g -c -o %t1.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -g -c -o %t1.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee -replay-ktest-dir=a --output-dir=%t.klee-out %t1.bc 2>&1
 //
diff --git a/test/regression/2018-10-01-double-segfault.c b/test/regression/2018-10-01-double-segfault.c
index 0fa10e8b..56207f0d 100644
--- a/test/regression/2018-10-01-double-segfault.c
+++ b/test/regression/2018-10-01-double-segfault.c
@@ -1,5 +1,5 @@
 // REQUIRES: not-asan
-// RUN: %llvmgcc %s -emit-llvm -O0 -g -c -o %t.bc
+// RUN: %llvmgcc %s -emit-llvm %O0opt -g -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee -output-dir=%t.klee-out %t.bc 2>&1 | FileCheck %s
 // CHECK: failed external call: strdup