repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
tls
/
static-1.C
blob
2392c6346190fa77362ea5198674f3490b2c0074
1
// { 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
}