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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tls/] [static-1.C] - Blame information for rev 149

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

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