Assertion when loading bitcode

I can cross-compile LLVM-2.5 to ARM and run lli on a simulator in debug
mode . However, when I now compile with optimization enabled, lli
triggers an assertion when loading bitcode files. The assertion looks
like this :

are you not able to use a more recent version of LLVM like LLVM-2.7?

I tried out LLVM-2.7. It also triggers an assertion. This time it is :

lli: /home/Virement/llvm/llvm-2.7/lib/VMCore/Value.cpp:394: void llvm::ValueHandleBase::AddToExistingUseList(llvm::ValueHandleBase**): Assertion `VP == Next->VP && “Added to wrong list?”’ failed.
0 lli 0x00658c30
Stack dump:
0. Program arguments: /arm-linux-llvm-2.7/bin/lli -march=arm /twofuncs.bc


What compiler are you using? It's possible the compiler you're using
is miscompiling LLVM.