OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [lto/] [trivial-1_0.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* { dg-lto-do run } */
2
/* { dg-skip-if "Needs OBJC2 ABI" { "*-*-darwin*" && lp64 } { "*" } { "" } } */
3
extern "C" {
4
extern int printf (char *,...) ;
5
extern void abort (void) ;
6
}
7
 
8
typedef struct objc_class *Class;
9
 
10
struct objc_class {
11
    Class isa;
12
    /* other stuff... */
13
}  ;
14
 
15
@interface myRootObject {
16
@public
17
     Class isa;
18
}
19
+initialize;
20
+(Class)class;
21
 
22
@end
23
 
24
@implementation myRootObject
25
+initialize {
26
     return self;
27
}
28
 
29
+(Class)class {
30
     return (Class)self;
31
}
32
 
33
@end
34
 
35
int main(void)
36
{
37
  Class cl = [myRootObject class];
38
  if (cl != (Class)0) {
39
    printf((char *)"trivial OK\n");
40
    return 0;
41
  }
42
  abort () ;
43
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.