From 34e9d17d1b5fdba2b6fe75979c941209a442560e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 17 Apr 2010 19:02:33 +0000 Subject: 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 --- test/CodeGen/Generic/crash.ll | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/CodeGen/Generic/crash.ll (limited to 'test/CodeGen/Generic') 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)] + -- cgit v1.1