blob: 1f71387ab3adac02fb238393ac3f1f15126f8927 [file] [log] [blame]
Chris Lattnerac161bf2009-01-02 07:01:27 +00001; RUN: not llvm-as < %s |& grep {invalid getelementptr indices}
Tanya Lattner16b222c2004-11-06 23:08:26 +00002
Dan Gohman2f156ae2008-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 Lattnere6a29682002-11-06 00:52:21 +00005
Nick Lewyckyec6f1662008-03-16 07:55:46 +00006define void @test({i32, i32*} * %X) {
7 getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
Chris Lattnere6a29682002-11-06 00:52:21 +00008 ret void
9}