blob: 2dccedacc31469af45e43bb11e0719cc53627f40 [file] [log] [blame]
Eli Benderskyaa3ffaf2013-04-08 18:33:51 +00001; RUN: not llvm-as < %s 2>&1 | FileCheck %s
2; CHECK: invalid getelementptr indices
Tanya Lattner16b222c2004-11-06 23:08:26 +00003
Dan Gohman2f156ae2008-05-16 00:16:32 +00004; This testcase is invalid because we are indexing into a pointer that is
5; contained WITHIN a structure.
Chris Lattnere6a29682002-11-06 00:52:21 +00006
Nick Lewyckyec6f1662008-03-16 07:55:46 +00007define void @test({i32, i32*} * %X) {
David Blaikie79e6c742015-02-27 19:29:02 +00008 getelementptr {i32, i32*}, {i32, i32*} * %X, i32 0, i32 1, i32 0
Chris Lattnere6a29682002-11-06 00:52:21 +00009 ret void
10}