about summary refs log tree commit diff homepage
path: root/test/Feature/NoExternalCallsAllowed.c
blob: 625704349fa8c35b3e958be44091021ec202e538 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang %s -emit-llvm %O0opt -c -g -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --external-calls=none %t1.bc 2>&1 | FileCheck %s
// RUN: test %t.klee-out/test000001.user.err
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
  // CHECK: Disallowed call to external function: abs
  int x = abs(argc);
  printf("%d\n", argc);
  return 0;
}