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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [torture/] [tls/] [thr-init-3.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target tls } */
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 "C" {
8
extern void abort ();
9
}
10
 
11
@interface tsObj: TestsuiteObject {
12
  int ai ;
13
}
14
 
15
- (int) fa:(int) n;
16
 
17
@end
18
 
19
@implementation tsObj
20
 
21
- (int) fa:(int) n
22
{
23
static __thread int as = 3;
24
  as += n ;
25
  return as ;
26
}
27
 
28
@end
29
 
30
int main (int ac, char *av[])
31
{
32
  int a ;
33
  tsObj *to = [tsObj new];
34
 
35
  a = [to fa:5];
36
  if ( a != 8 )
37
    abort () ;
38
 
39
  return 0;
40
}

powered by: WebSVN 2.1.0

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