<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 4, 2009, at 1:33 PM, S. Bharadwaj Yadavalli wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Duncan,<br><br>Thanks for your reply.<br><br>I did try the method suggested by you. I got a foo.bc with -emit-llvm switch. llc on foo.bc gets me the same assertion failure, as you pointed out. <br><br>Then I ran bugpoint to generate bugpoint-reduced-simplified.bc and bugpoint-reduced-function.bc. My previous experience is that if I compile either if them, I would get the same failure as I did with foo.bc. That is not the case. I get a different assertion failure when I compile either of them with llc which is as follows:<br> <br>llc: <llvm-src>/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp:2808: void llvm::DwarfDebug::ConstructCompileUnits(): Assertion `Root->hasLinkOnceLinkage() && Root->hasOneUse() && "Malformed compile unit descriptor anchor type"' failed.</blockquote><div><br></div>This is because bugpoint tool does not understand debug info intrinsics.</div><div>To avoid this, when you generate foo.bc with -emit-llvm switch, do not use -g on the llvm-gcc command line.</div><div><br></div><div>-</div><div>Devang</div><div><br></div><div><blockquote type="cite"><br> <br>This makes it hard for me to easily create a test case and submit a bug report.<br><br>Hence, I thought I should take this opportunity to delve deeper into LLVM and look at this issue.<br><br>Any further nudges / help is highly appreciated!<br> <br>Thanks,<br><br>Bharadwaj<br><br><div class="gmail_quote">On Wed, Mar 4, 2009 at 3:59 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Bharadwaj,<br> <div class="im"><br> > I get the following error during compilation using the LLVM cross-compiler<br> > (x86_64->arm).<br> ><br> > error: nested functions are disabled, use -fnested-functions to re-enable<br> <br> </div>yes, nested functions are disabled by default in llvm-gcc (not sure why -<br> maybe a historical hang over from the days when they were not supported?).<br> <div class="im"><br> > With -fnested-functions switch, I get the following error:<br> ><br> > <llvm-src-dir>/llvm/lib/Target/ARM/ARMISelLowering.cpp:1439: virtual<br> > llvm::SDValue llvm::ARMTargetLowering::LowerOperation(llvm::SDValue,<br> > llvm::SelectionDAG&): Assertion `0 && "Don't know how to custom lower<br> > this!"' failed.<br> > frobos/tests/hello.c:453: internal compiler error: Aborted<br> > Please submit a full bug report,<br> > with preprocessed source if appropriate.<br> > See <URL:<a href="http://developer.apple.com/bugreporter" target="_blank">http://developer.apple.com/bugreporter</a>> for instructions.<br> ><br> > I'd like to investigate this but am wondering if anyone has any<br> > thoughts/suggestions in this area.<br> <br> </div>I don't know anything about cross-compiling, but the usual way<br> to debug this kind of thing is to re-run by hand the line that<br> caused this assertion, but adding -emit-llvm to the command line.<br> The output will then contain LLVM bitcode.  If you are lucky,<br> then running llc on the bitcode will give the same assertion<br> failure.  If so, then "bugpoint --run-llc the_bit_code" should<br> automatically reduce a minimal testcase.<br> <br> Ciao,<br> <font color="#888888"><br> Duncan.<br> </font></blockquote></div><br> _______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-</div><div>Devang</div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></body></html>