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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [tls/] [static-1.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-additional-sources "static-1a.mm" }
5
 
6
extern "C" {
7
extern void abort ();
8
}
9
extern int test ();
10
 
11
struct A
12
{
13
  static __thread int i;
14
};
15
 
16
__thread int A::i = 8;
17
 
18
int
19
main ()
20
{
21
  if (A::i != 8)
22
    abort ();
23
 
24
  if (test ())
25
    abort ();
26
 
27
  if (A::i != 17)
28
    abort ();
29
 
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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