about summary refs log tree commit diff homepage
path: root/test/regression/2019-09-06-make-const-symbolic.c
blob: 46e39cdc21c9196bc1883962a43f3fa4c25b0640 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang %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
#include "klee/klee.h"

const int c = 23;
int main(int argc, char **argv) {
  klee_make_symbolic(&c, sizeof(c), "c");
  // CHECK: cannot make readonly object symbolic

  if (c > 20)
    return 0;
  else
    return 1;
}