| 1 |
/* { dg-lto-do run } */ |
| 2 |
|
| 3 |
extern int printf (char *,...) ; |
| 4 |
|
| 5 |
typedef struct objc_class *Class; |
| 6 |
|
| 7 |
struct objc_class { |
| 8 |
Class isa; |
| 9 |
/* other stuff... */ |
| 10 |
}; |
| 11 |
|
| 12 |
@interface myRootObject { |
| 13 |
@public |
| 14 |
Class isa; |
| 15 |
} |
| 16 |
+initialize; |
| 17 |
+(Class)class; |
| 18 |
|
| 19 |
@end |
| 20 |
|
| 21 |
@implementation myRootObject |
| 22 |
+initialize { |
| 23 |
return self; |
| 24 |
} |
| 25 |
|
| 26 |
+(Class)class { |
| 27 |
return (Class)self; |
| 28 |
} |
| 29 |
|
| 30 |
@end |
| 31 |
|
| 32 |
int main(void) |
| 33 |
{ |
| 34 |
[myRootObject class]; |
| 35 |
printf("trivial OK\n"); |
| 36 |
return 0; |
| 37 |
} |