summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/lto/trivial-1_0.m
blob: 076f2306c1beac6be1aff1977a05845074f95762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* { dg-lto-do run } */
/* { dg-skip-if "" { "*-*-darwin*" && lp64 } { "*" } { "" } } */
extern int printf (char *,...) ;

typedef struct objc_class *Class;

struct objc_class {
    Class isa;
    /* other stuff... */
}  ;

@interface myRootObject {
@public
     Class isa;
}
+initialize;
+(Class)class;

@end

@implementation myRootObject
+initialize {
     return self;
}

+(Class)class {
     return (Class)self;
}

@end

int main(void)
{
  [myRootObject class];
  printf("trivial OK\n");
  return 0;
}