blob: 2dccedacc31469af45e43bb11e0719cc53627f40 [file] [log] [blame]
Eli Benderskyc3d5c1c2013-04-08 18:33:51 +00001; RUN: not llvm-as < %s 2>&1 | FileCheck %s
2; CHECK: invalid getelementptr indices
Tanya Lattner2393a242004-11-06 23:08:26 +00003
Dan Gohmaneedff312008-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 Lattner5051e9c2002-11-06 00:52:21 +00006
Nick Lewycky3f637852008-03-16 07:55:46 +00007define void @test({i32, i32*} * %X) {
David Blaikie198d8ba2015-02-27 19:29:02 +00008 getelementptr {i32, i32*}, {i32, i32*} * %X, i32 0, i32 1, i32 0
Chris Lattner5051e9c2002-11-06 00:52:21 +00009 ret void
10}