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

Subversion Repositories openrisc

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

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 void abort() ;
6
 
7
static __thread int fstat ;
8
static __thread int fstat = 1;
9
 
10
int test_code(int b)
11
{
12
  fstat += b ;
13
  return fstat;
14
}
15
 
16
int main (int ac, char *av[])
17
{
18
  int a = test_code(1);
19
 
20
  if ((a != 2) || (fstat != 2))
21
    abort () ;
22
 
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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