http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45878
Summary: Can't compile even a trivial ObjC program with
-fexceptions -O2
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 21953
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=21953
Test case that does not compile with -fexceptions -O2
The following testcase:
#import <objc/objc.h>
#import <objc/NXConstStr.h>
void function (void)
{
if ([@"strings" isEqual: nil])
{
;
}
}
fails to compile if you compile it with -O2 -fexceptions.
gcc gimple_call.m -lobjc -c -O2 -fexceptions
gimple_call.m: In function ‘function’:
gimple_call.m:10:1: error: invalid conversion in gimple call
BOOL
struct objc_object *
# .MEM_7 = VDEF <.MEM_6>
D.3351_3 = D.3350_1 (&_OBJC_INSTANCE_0, &_OBJC_SELECTOR_TABLE, 0B);
gimple_call.m:10:1: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Thanks