summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-02-01 22:40:09 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-02-01 22:40:09 +0000
commit7276c8c2b5feb321e60fb849a0a109a52ea330b1 (patch)
tree824fc88b64ba48ca7e64591391ada46ef14fa99b /test/CodeGen/X86/2010-02-01-TaillCallCrash.ll
parente7ea6fd7cb951da539d1642121b1e32532d7ec14 (diff)
downloadexternal_llvm-7276c8c2b5feb321e60fb849a0a109a52ea330b1.zip
external_llvm-7276c8c2b5feb321e60fb849a0a109a52ea330b1.tar.gz
external_llvm-7276c8c2b5feb321e60fb849a0a109a52ea330b1.tar.bz2
Fix PR6196. GV callee may not be a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2010-02-01-TaillCallCrash.ll')
-rw-r--r--test/CodeGen/X86/2010-02-01-TaillCallCrash.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll b/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll
new file mode 100644
index 0000000..2751174
--- /dev/null
+++ b/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu
+; PR6196
+
+%"char[]" = type [1 x i8]
+
+@.str = external constant %"char[]", align 1 ; <%"char[]"*> [#uses=1]
+
+define i32 @regex_subst() nounwind {
+entry:
+ %0 = tail call i32 bitcast (%"char[]"* @.str to i32 (i32)*)(i32 0) nounwind ; <i32> [#uses=1]
+ ret i32 %0
+}