summaryrefslogtreecommitdiff
path: root/test/ubsan/TestCases/Misc/unreachable.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-14 11:42:22 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-14 11:42:22 +0000
commit2cac0ee49af612c518213a14022c6b0c08fb5e7b (patch)
treea46446ceefa1a4befd8359427a6bb26a3651549b /test/ubsan/TestCases/Misc/unreachable.cpp
parent2c44cbe210a9f88a50489446202c4cb5e974744e (diff)
Move UBSan test suite under test/
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ubsan/TestCases/Misc/unreachable.cpp')
-rw-r--r--test/ubsan/TestCases/Misc/unreachable.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ubsan/TestCases/Misc/unreachable.cpp b/test/ubsan/TestCases/Misc/unreachable.cpp
new file mode 100644
index 000000000..75fc3e5bd
--- /dev/null
+++ b/test/ubsan/TestCases/Misc/unreachable.cpp
@@ -0,0 +1,6 @@
+// RUN: %clangxx -fsanitize=unreachable %s -O3 -o %t && %t 2>&1 | FileCheck %s
+
+int main(int, char **argv) {
+ // CHECK: unreachable.cpp:5:3: runtime error: execution reached a __builtin_unreachable() call
+ __builtin_unreachable();
+}