summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-17 19:02:33 +0000
committerChris Lattner <sabre@nondot.org>2010-04-17 19:02:33 +0000
commit34e9d17d1b5fdba2b6fe75979c941209a442560e (patch)
treeace778ae97f986b23738b5f3885a2689c4bb2c21 /test/CodeGen/Generic/crash.ll
parenteef6d78be1c3a685f277be3e89ff17f67ed65f49 (diff)
downloadllvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.tar.gz
llvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.tar.bz2
llvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.tar.xz
fix PR6332, allowing an index of zero into a zero sized array
even if the element of the array has no size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/crash.ll')
-rw-r--r--test/CodeGen/Generic/crash.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/crash.ll b/test/CodeGen/Generic/crash.ll
new file mode 100644
index 0000000000..7218565617
--- /dev/null
+++ b/test/CodeGen/Generic/crash.ll
@@ -0,0 +1,8 @@
+; RUN: llc %s -o -
+
+; PR6332
+%struct.AVCodecTag = type opaque
+@ff_codec_bmp_tags = external global [0 x %struct.AVCodecTag]
+@tags = global [1 x %struct.AVCodecTag*] [%struct.AVCodecTag* getelementptr
+inbounds ([0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
+