about summary refs log tree commit diff homepage
path: root/test/Feature/ubsan/ubsan_unreachable.c
blob: 56de8e617d6c9348bb1d1a9411f2266777fc82cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang %s -fsanitize=unreachable -emit-llvm -g %O0opt -c -o %t.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --emit-all-errors --ubsan-runtime %t.bc 2>&1 | FileCheck %s

#include "klee/klee.h"

void _Noreturn f() {
  // CHECK: runtime/Sanitizer/ubsan/ubsan_handlers.cpp:35: unreachable-call
  __builtin_unreachable();
}

int main() {
  f();

  return 0;
}