<div dir="ltr">I insert an function call in the IR, and causes the following error. and the error seems to happen on some cases. The attached file nest.c can be  processes successfully and the nest-ddp.ll is the output file, but the nr__routines.c will fail. <div>
<br><div><div>llvm-3.2-svn/lib/VMCore/DebugLoc.cpp:60: void llvm::DebugLoc::getScopeAndInlinedAt(llvm::MDNode*&, llvm::MDNode*&, const llvm::LLVMContext&) const: Assertion `unsigned(ScopeIdx) <= Ctx.pImpl->ScopeRecords.size() && "Invalid ScopeIdx!"' failed.</div>
<div><br></div><div>0  opt                        0x0000000000cde472</div><div>1  opt                        0x0000000000cde147</div><div>2  libpthread.so.0            0x0000003faf60f500</div><div>3  libc.so.6                  0x0000003faee328a5 gsignal + 53</div>
<div>4  libc.so.6                  0x0000003faee34085 abort + 373</div><div>5  libc.so.6                  0x0000003faee2ba1e</div><div>6  libc.so.6                  0x0000003faee2bae0 __assert_perror_fail + 0</div><div>7  opt                        0x0000000000b98f63 llvm::DebugLoc::getScopeAndInlinedAt(llvm::MDNode*&, llvm::MDNode*&, llvm::LLVMContext const&) const + 147</div>
<div>8  opt                        0x0000000000b99166 llvm::DebugLoc::getAsMDNode(llvm::LLVMContext const&) const + 70</div><div>9  opt                        0x0000000000c373ec llvm::Instruction::getMetadataImpl(unsigned int) const + 52</div>
<div>10 opt                        0x0000000000c36f93 llvm::Instruction::getMetadataImpl(llvm::StringRef) const + 73</div><div>11 libLDDProfileInstrument.so 0x00007f4fe146a14d</div><div>12 libLDDProfileInstrument.so 0x00007f4fe14661aa</div>
<div>13 libLDDProfileInstrument.so 0x00007f4fe1465231</div><div>14 libLDDProfileInstrument.so 0x00007f4fe14660bc</div><div>15 opt                        0x0000000000c441d0 llvm::MPPassManager::runOnModule(llvm::Module&) + 456</div>
<div>16 opt                        0x0000000000c446f5 llvm::PassManagerImpl::run(llvm::Module&) + 125</div><div>17 opt                        0x0000000000c448ad llvm::PassManager::run(llvm::Module&) + 39</div><div>
18 opt                        0x00000000006acebb main + 5540</div><div>19 libc.so.6                  0x0000003faee1ecdd __libc_start_main + 253</div><div>20 opt                        0x000000000069cce9</div></div></div></div>