summaryrefslogtreecommitdiff
path: root/test/Feature/unreachable.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Feature/unreachable.ll')
-rw-r--r--test/Feature/unreachable.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Feature/unreachable.ll b/test/Feature/unreachable.ll
new file mode 100644
index 0000000000..84c4552a62
--- /dev/null
+++ b/test/Feature/unreachable.ll
@@ -0,0 +1,13 @@
+
+implementation
+
+declare void %bar()
+
+int %foo() { ;; Calling this function has undefined behavior
+ unreachable
+}
+
+double %xyz() {
+ call void %bar()
+ unreachable ;; Bar must not return.
+}