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.<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>