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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tls/] [static-1.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// { dg-options "-O2" }
3
// { dg-require-effective-target tls_runtime }
4
// { dg-add-options tls }
5
// { dg-additional-sources "static-1a.cc" }
6
 
7
extern "C" void abort ();
8
extern int test ();
9
 
10
struct A
11
{
12
  static __thread int i;
13
};
14
 
15
__thread int A::i = 8;
16
 
17
int
18
main ()
19
{
20
  if (A::i != 8)
21
    abort ();
22
 
23
  if (test ())
24
    abort ();
25
 
26
  if (A::i != 17)
27
    abort ();
28
 
29
  return 0;
30
}

powered by: WebSVN 2.1.0

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