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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [tls/] [thr-init-2.c] - Blame information for rev 754

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target tls_runtime } */
3
/* { dg-add-options tls } */
4
 
5
extern int printf (char *,...);
6
extern void abort() ;
7
 
8
static __thread int fstat ;
9
static __thread int fstat = 1;
10
static __thread int fstat ;
11
 
12
int test_code(int b)
13
{
14
  fstat += b ;
15
  return fstat;
16
}
17
 
18
int main (int ac, char *av[])
19
{
20
  int a = test_code(1);
21
 
22
  if ( a != 2 || fstat != 2 )
23
    {
24
    printf ("a=%d fstat=%d\n", a, fstat) ;
25
    abort ();
26
    }
27
 
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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