aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/crash.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/crash.ll')
-rw-r--r--test/CodeGen/X86/crash.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/X86/crash.ll b/test/CodeGen/X86/crash.ll
index cfa1270..8ce9e6c 100644
--- a/test/CodeGen/X86/crash.ll
+++ b/test/CodeGen/X86/crash.ll
@@ -90,3 +90,28 @@ foo:
store i8 %8, i8* undef, align 1
ret void
}
+
+
+;; Issues with referring to a label that gets RAUW'd later.
+define i32 @test6a() nounwind {
+entry:
+ %target = bitcast i8* blockaddress(@test6b, %test_label) to i8*
+
+ call i32 @test6b(i8* %target)
+
+ ret i32 0
+}
+
+define i32 @test6b(i8* %target) nounwind {
+entry:
+ indirectbr i8* %target, [label %test_label]
+
+test_label:
+; assume some code here...
+ br label %ret
+
+ret:
+ ret i32 -1
+}
+
+