aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic
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
parenteef6d78be1c3a685f277be3e89ff17f67ed65f49 (diff)
downloadexternal_llvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.zip
external_llvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.tar.gz
external_llvm-34e9d17d1b5fdba2b6fe75979c941209a442560e.tar.bz2
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')
-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 0000000..7218565
--- /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)]
+