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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [torture/] [tls/] [thr-init-3.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target tls_runtime } */
3
/* { dg-add-options tls } */
4
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5
 
6
#include "../../../objc-obj-c++-shared/TestsuiteObject.m"
7
extern void _exit(int);
8
 
9
@interface tsObj: TestsuiteObject {
10
  int ai ;
11
}
12
 
13
- (int) fa:(int) n;
14
 
15
@end
16
 
17
@implementation tsObj
18
 
19
- (int) fa:(int) n
20
{
21
static __thread int as = 3;
22
  as += n ;
23
  return as ;
24
}
25
 
26
@end
27
 
28
int main (int ac, char *av[])
29
{
30
  int a ;
31
  tsObj *to = [tsObj new];
32
 
33
  a = [to fa:5];
34
  if ( a != 8 )
35
    _exit (-(__LINE__)) ;
36
 
37
  return 0;
38
}

powered by: WebSVN 2.1.0

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