blob: 3d4e3c510ee2fd89890a2b1b6931189008403dc6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// REQUIRES: geq-llvm-7.0
// RUN: %clang %s -emit-llvm %O0opt -g -c -fdiscard-value-names -o %t.bc
// RUN: rm -rf %t.klee-out-d
// RUN: %klee --output-dir=%t.klee-out-d %t.bc
// RUN: FileCheck -input-file=%t.klee-out-d/test000001.assert.err -check-prefix=CHECK-DISCARD %s
// RUN: %clang %s -emit-llvm %O0opt -g -c -fno-discard-value-names -o %t.bc
// RUN: rm -rf %t.klee-out-n
// RUN: %klee --output-dir=%t.klee-out-n %t.bc
// RUN: FileCheck -input-file=%t.klee-out-n/test000001.assert.err -check-prefix=CHECK-NODISCARD %s
#include "klee/klee.h"
#include <assert.h>
void foo(int i, int k) {
++i; ++k;
assert(0);
// CHECK-DISCARD: {{.*}} in foo(symbolic, 12) at {{.*}}.c:18
// CHECK-DISCARD: {{.*}} in main() at {{.*}}.c:28
// CHECK-NODISCARD: {{.*}} in foo(i=symbolic, k=12) at {{.*}}.c:18
// CHECK-NODISCARD: {{.*}} in main() at {{.*}}.c:28
}
int main(void) {
int i, k=12;
klee_make_symbolic(&i, sizeof(i), "i");
foo(i,k);
}
|