Code-emission problem

Hi Everyone,
When I compile a program with clang with debug symbols enabled and I try to run it using the JIT (lli) I get the
following error message. I am running on Lion (10.7.4). Thanks.

George

pseudo instructions should be removed before code emission
UNREACHABLE executed at /Users/JD/Software/llvm3.1/llvm-3.1.src/lib/Target/X86/X86CodeEmitter.cpp:736!
0 lli 0x0000000103518b6e _ZL15PrintStackTracePv + 46
1 lli 0x0000000103519119 _ZL13SignalHandleri + 297
2 libsystem_c.dylib 0x00007fff93630cfa _sigtramp + 26
3 libsystem_c.dylib 0x0000000000000001 _sigtramp + 18446603338043421473
4 lli 0x0000000103518e3b raise + 27
5 lli 0x0000000103518ef2 abort + 18
6 lli 0x0000000103500cf6 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 198
7 lli 0x0000000102afb170 (anonymous namespace)::Emitterllvm::JITCodeEmitter::emitInstruction(llvm::MachineInstr&, llvm::MCInstrDesc const*) + 3408
8 lli 0x0000000102afa351 (anonymous namespace)::Emitterllvm::JITCodeEmitter::runOnMachineFunction(llvm::MachineFunction&) + 577
9 lli 0x0000000102fb953e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 110
10 lli 0x0000000103481d9d llvm::FPPassManager::runOnFunction(llvm::Function&) + 445
11 lli 0x00000001034815d1 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 129
12 lli 0x0000000103481542 llvm::FunctionPassManager::run(llvm::Function&) + 162
13 lli 0x0000000102ebb2cf llvm::JIT::jitTheFunction(llvm::Function*, llvm::MutexGuard const&) + 63
14 lli 0x0000000102ebb17a llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) + 122
15 lli 0x0000000102ebb5b7 llvm::JIT::getPointerToFunction(llvm::Function*) + 695
16 lli 0x0000000102eb9bfb llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocatorllvm::GenericValue > const&) + 171
17 lli 0x00000001032a39f6 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocatorstd::string > const&, char const* const*) + 1126
18 lli 0x0000000102a7a123 main + 2915
19 lli 0x0000000102a79534 start + 52
Stack dump:
0. Program arguments: lli test.bc

  1. Running pass ‘X86 Machine Code Emitter’ on function ‘@main
    Illegal instruction: 4

Can you include the code that causes the failure?

Hi George,

there already is a bug report for this:
http://llvm.org/bugs/show_bug.cgi?id=12912

Cheers,
Clemens