about summary refs log tree commit diff homepage
path: root/test/Feature/IsSymbolic.c
blob: 4a86368af90b847f80376182bc3a599cd0310101 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
// RUN: %klee %t1.bc

#include <assert.h>

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