aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-03-29 21:27:30 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-03-29 21:27:30 +0000
commit8e36a5c960e07555d80fb98d71c692c20f3ea6c4 (patch)
treea4c70e9af0e9c469f84ef71fc3e0de99d67cb60a /test/CodeGen/Generic
parent0ea86bc411748f10b913f42ef3a71b46ace7ceb2 (diff)
downloadexternal_llvm-8e36a5c960e07555d80fb98d71c692c20f3ea6c4.zip
external_llvm-8e36a5c960e07555d80fb98d71c692c20f3ea6c4.tar.gz
external_llvm-8e36a5c960e07555d80fb98d71c692c20f3ea6c4.tar.bz2
Fix PR4975. Avoid referencing empty vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r--test/CodeGen/Generic/2010-ZeroSizedArg.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2010-ZeroSizedArg.ll b/test/CodeGen/Generic/2010-ZeroSizedArg.ll
new file mode 100644
index 0000000..ba40bd0
--- /dev/null
+++ b/test/CodeGen/Generic/2010-ZeroSizedArg.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s
+; PR4975
+
+%0 = type <{ [0 x i32] }>
+%union.T0 = type { }
+
+@.str = private constant [1 x i8] c" "
+
+define arm_apcscc void @t(%0) nounwind {
+entry:
+ %arg0 = alloca %union.T0
+ %1 = bitcast %union.T0* %arg0 to %0*
+ store %0 %0, %0* %1, align 1
+ ret void
+}
+
+declare arm_apcscc i32 @printf(i8*, ...)