<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Adding "--enable-assertions" to the llvm-gcc configure line causes the build to fail. Having just LLVM configured with --enable-assertions doesn't reproduce the error. An assertion build (the Apple way) doesn't assert.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>-bw</DIV><DIV><BR><DIV><DIV>On Sep 19, 2007, at 5:48 PM, Dale Johannesen wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>This should have gotten an assertion failure in a compiler built with assertions, surely...</DIV><BR><DIV><DIV>On Sep 19, 2007, at 5:41 PM, Devang Patel wrote:</DIV><BLOCKQUOTE type="cite"><DIV><BLOCKQUOTE type="cite">$ llvm-gcc -x objective-c -arch ppc64 -std=c99 -c testcase.mi<BR>testcase.mi:12: internal compiler error: Bus error<BR>Please submit a full bug report,<BR>with preprocessed source if appropriate.<BR>See <URL:<A href="http://llvm.org/bugs">http://llvm.org/bugs</A>> for instructions.<BR></BLOCKQUOTE></DIV><BR><DIV>In llvm-backend.cpp  :</DIV><DIV><BR></DIV><DIV><DIV><FONT class="Apple-style-span" face="Courier">1086</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">        </FONT></SPAN><FONT class="Apple-style-span" face="Courier">        if (GV->getName() != Name) {</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">1087</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">   </FONT></SPAN><FONT class="Apple-style-span" face="Courier">          Function *F = TheModule->getFunction(Name);</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">1088</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">  </FONT></SPAN><FONT class="Apple-style-span" face="Courier">          assert(F && F->isDeclaration() && "A function turned into a global?");</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">1089</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">     </FONT></SPAN><FONT class="Apple-style-span" face="Courier">          </FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">1090</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">        </FONT></SPAN><FONT class="Apple-style-span" face="Courier">          // Replace any uses of "F" with uses of GV.</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">1091</FONT><SPAN class="Apple-tab-span" style="white-space:pre"><FONT class="Apple-style-span" face="Courier">   </FONT></SPAN><FONT class="Apple-style-span" face="Courier">          Value *FInNewType = ConstantExpr::getBitCast(GV, F->getType());</FONT></DIV><BR><BR class="webkit-block-placeholder"></DIV><DIV><DIV>(gdb) p Name</DIV><DIV>$3 = 0x41819430 "\001L_OBJC_PROTOCOL_$_CPTransferThreadObserving"</DIV><BR>However  <FONT class="Apple-style-span" face="Courier">TheModule->getFunction(Name)</FONT> returns NULL and you get ICE at <FONT class="Apple-style-span" face="Courier">F->getType(</FONT>) #1091. I'll let you investigate this further ...   :)</DIV><DIV> </DIV><DIV><BR class="webkit-block-placeholder"></DIV><DIV>-</DIV><DIV>Devang</DIV><DIV><BR class="webkit-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">LLVM Developers mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A> <SPAN class="Apple-converted-space">        </SPAN><A href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A></DIV> </BLOCKQUOTE></DIV><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">LLVM Developers mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A> <SPAN class="Apple-converted-space">        </SPAN><A href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>