blob: 1f71387ab3adac02fb238393ac3f1f15126f8927 [file] [log] [blame]
Chris Lattnerdf986172009-01-02 07:01:27 +00001; RUN: not llvm-as < %s |& grep {invalid getelementptr indices}
Tanya Lattner2393a242004-11-06 23:08:26 +00002
Dan Gohmaneedff312008-05-16 00:16:32 +00003; This testcase is invalid because we are indexing into a pointer that is
4; contained WITHIN a structure.
Chris Lattner5051e9c2002-11-06 00:52:21 +00005
Nick Lewycky3f637852008-03-16 07:55:46 +00006define void @test({i32, i32*} * %X) {
7 getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
Chris Lattner5051e9c2002-11-06 00:52:21 +00008 ret void
9}