about summary refs log tree commit diff homepage
path: root/test/Feature/IsSymbolic.c
blob: 033d9d6a4d6e6831c509b1fdcf5c0a5479bb651d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang %s -emit-llvm %O0opt -c -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t1.bc

#include <assert.h>

int main() {
  int x, y, z = 0;
  klee_make_symbolic(&x, sizeof x, "x");
  klee_make_symbolic(&y, sizeof y, "y");
  if (x) {
    assert(klee_is_symbolic(y));
  } else {
    assert(!klee_is_symbolic(z));
  }
  return 0;
}