repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tls
/
static-1.C
blob
027a94297662acf0fed01aab517ddb2d29b3c9a0
1
// { dg-do run }
2
// { dg-options "-O2" }
3
// { dg-require-effective-target tls_runtime }
4
// { dg-additional-sources "static-1a.cc" }
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
}