1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/Verifier/2002-11-05-GetelementptrPointers.ll
Dan Gohman fe7f6bc9ce Revert the change from r51157 in
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.

llvm-svn: 51171
2008-05-16 00:16:32 +00:00

10 lines
276 B
LLVM

; RUN: not llvm-as < %s |& grep {Invalid getelementptr indices}
; This testcase is invalid because we are indexing into a pointer that is
; contained WITHIN a structure.
define void @test({i32, i32*} * %X) {
getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
ret void
}