summaryrefslogtreecommitdiffstats
path: root/test/Verifier/2002-11-05-GetelementptrPointers.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Verifier/2002-11-05-GetelementptrPointers.ll')
-rw-r--r--test/Verifier/2002-11-05-GetelementptrPointers.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Verifier/2002-11-05-GetelementptrPointers.ll b/test/Verifier/2002-11-05-GetelementptrPointers.ll
new file mode 100644
index 0000000..1f71387
--- /dev/null
+++ b/test/Verifier/2002-11-05-GetelementptrPointers.ll
@@ -0,0 +1,9 @@
+; 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
+}