Hi all,
This program:
@protocol CPTransferThreadObserving;
@interface CPMode {}
@end
@implementation CPMode
-(void) copyInBackgroundAndNotifyUsingPorts {
id client;
[client setProtocolForProxy:
@protocol(CPTransferThreadObserving)];
}
@end
produces this internal compiler error:
$ llvm-gcc -x objective-c -arch ppc64 -std=c99 -c testcase.mi
testcase.mi:12: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs> for instructions.
If I run this with a debug version of LLVM, it doesn't ICE. I don't
have access to a Linux machine, but if someone does, could they run
valgrind on this to see if anything bad is happening?
Thanks!
-bw
On Sep 19, 2007, at 4:48 PM, Bill Wendling wrote:> Hi all, > > This program: > > @protocol CPTransferThreadObserving; > > @interface CPMode {} > @end > > @implementation CPMode > -(void) copyInBackgroundAndNotifyUsingPorts { > id client; > [client setProtocolForProxy: > @protocol(CPTransferThreadObserving)]; > } > @end > > produces this internal compiler error: > > $ llvm-gcc -x objective-c -arch ppc64 -std=c99 -c testcase.mi > testcase.mi:12: internal compiler error: Bus error > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://llvm.org/bugs> for instructions.In llvm-backend.cpp : 1086 if (GV->getName() != Name) { 1087 Function *F = TheModule->getFunction(Name); 1088 assert(F && F->isDeclaration() && "A function turned into a global?"); 1089 1090 // Replace any uses of "F" with uses of GV. 1091 Value *FInNewType = ConstantExpr::getBitCast(GV, F- >getType()); (gdb) p Name $3 = 0x41819430 "\001L_OBJC_PROTOCOL_$_CPTransferThreadObserving" However TheModule->getFunction(Name) returns NULL and you get ICE at F->getType() #1091. I'll let you investigate this further ... :) - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070919/cc41a28a/attachment.html>
This should have gotten an assertion failure in a compiler built with assertions, surely... On Sep 19, 2007, at 5:41 PM, Devang Patel wrote:>> $ llvm-gcc -x objective-c -arch ppc64 -std=c99 -c testcase.mi >> testcase.mi:12: internal compiler error: Bus error >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <URL:http://llvm.org/bugs> for instructions. > > In llvm-backend.cpp : > > 1086 if (GV->getName() != Name) { > 1087 Function *F = TheModule->getFunction(Name); > 1088 assert(F && F->isDeclaration() && "A function turned > into a global?"); > 1089 > 1090 // Replace any uses of "F" with uses of GV. > 1091 Value *FInNewType = ConstantExpr::getBitCast(GV, F- > >getType()); > > > (gdb) p Name > $3 = 0x41819430 "\001L_OBJC_PROTOCOL_$_CPTransferThreadObserving" > > However TheModule->getFunction(Name) returns NULL and you get ICE > at F->getType() #1091. I'll let you investigate this further ... :) > > > - > Devang > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070919/1ead5eb9/attachment.html>
On Sep 19, 2007, at 5:41 PM, Devang Patel wrote:> On Sep 19, 2007, at 4:48 PM, Bill Wendling wrote: > > In llvm-backend.cpp : > > 1086 if (GV->getName() != Name) { > 1087 Function *F = TheModule->getFunction(Name); > 1088 assert(F && F->isDeclaration() && "A function turned > into a global?"); > 1089 > 1090 // Replace any uses of "F" with uses of GV. > 1091 Value *FInNewType = ConstantExpr::getBitCast(GV, F- > >getType()); > > > (gdb) p Name > $3 = 0x41819430 "\001L_OBJC_PROTOCOL_$_CPTransferThreadObserving" > > However TheModule->getFunction(Name) returns NULL and you get ICE > at F->getType() #1091. I'll let you investigate this further ... :) >How were you able to get gdb to work with this?! -bw -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070920/71532f23/attachment.html>