Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing.
[oota-llvm.git] / test / Assembler / 2005-02-09-AsmWriterStoreBug.ll
1 ; RUN: llvm-as < %s | llvm-dis | llvm-as
2
3 ; Ensure that the asm writer emits types before both operands of the 
4 ; store, even though they can be the same.
5
6 %RecTy = type %RecTy*
7
8 define void @foo() {
9         %A = malloc %RecTy              ; <%RecTy> [#uses=1]
10         %B = malloc %RecTy              ; <%RecTy> [#uses=1]
11         store %RecTy %B, %RecTy %A
12         ret void
13 }
14