about summary refs log tree commit diff homepage
path: root/test/Feature/BFSSearcher.c
blob: 57553b1debe3c60f862626c4c586bf9bb719b238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang %s -emit-llvm -g -c -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --max-instructions=500 --search=bfs %t1.bc 2>%t2.log
// RUN: FileCheck -input-file=%t2.log %s
#include "assert.h"
#include "klee/klee.h"

int nd() {
  int r;
  klee_make_symbolic(&r, sizeof(r), "r");
  return r;
}

int main() {
  int x = 1;
  while (nd() != 0) {
    x *= 2;
  }
  // CHECK: ASSERTION FAIL
  klee_assert(0);
  return x;
}