aboutsummaryrefslogtreecommitdiffstats
path: root/test/Integer/unreachable_bt.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Integer/unreachable_bt.ll')
-rw-r--r--test/Integer/unreachable_bt.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Integer/unreachable_bt.ll b/test/Integer/unreachable_bt.ll
new file mode 100644
index 0000000..cb65d4b
--- /dev/null
+++ b/test/Integer/unreachable_bt.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
+; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
+; RUN: diff %t1.ll %t2.ll
+
+
+
+declare void @bar()
+
+define i9 @foo() { ;; Calling this function has undefined behavior
+ unreachable
+}
+
+define double @xyz() {
+ call void @bar()
+ unreachable ;; Bar must not return.
+}