Description
Bugzilla Link | 6131 |
Resolution | FIXED |
Resolved on | Sep 02, 2010 07:56 |
Version | trunk |
OS | Linux |
Attachments | Testcase to demonstrate the problem, backtrace for the clang crash |
Reporter | LLVM Bugzilla Contributor |
CC | @davidchisnall |
Extended Description
Hello,
I recently stumbled upon an odd crash with recent clang trunk (r94363) on a 64bit Linux machine, when I was trying to debug some problems with the GNUstep Objective-C runtime. In particular, clang is crashing for me when you try to assign a @protocol()-object to the corresponding runtime structure like this:
struct objc_protocol *foo = @protocol(Foo);
I have attached a test case that demonstrates the problem with a reduced definition of struct objc_protocol and the corresponding backtrace from gdb.
I'm also confused as to why clang tries to print a warning here. If I replace
the above with
void foo = (void)@protocol(TestProtocol);
It will print the following error:
protocol.m:12:13: error: initializer element is not a compile-time constant
It would be great if someone had an idea about what is going wrong here