diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/pr45878.m')
-rw-r--r-- | gcc/testsuite/objc.dg/pr45878.m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/pr45878.m b/gcc/testsuite/objc.dg/pr45878.m new file mode 100644 index 000000000..39fd6c3cd --- /dev/null +++ b/gcc/testsuite/objc.dg/pr45878.m @@ -0,0 +1,38 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fexceptions" } */ + +typedef struct objc_object { Class class_pointer; } *id; +typedef unsigned char BOOL; + +@interface Object +{ + Class isa; +} +- (BOOL)isEqual:anObject; +@end + +#ifdef __NEXT_RUNTIME__ +@interface NSConstantString: Object +{ + char *c_string; + unsigned int len; +} +@end +extern void *_NSConstantStringClassReference; +#else +@interface NXConstantString: Object +{ + char *c_string; + unsigned int len; +} +@end +#endif + +void function (void) +{ + if ([@"strings" isEqual: (id)0]) + { + ; + } +} + |