repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
reflect: canonicalize types returned by StructOf() and friends
[official-gcc.git]
/
gcc
/
testsuite
/
obj-c++.dg
/
tls
/
static-1.mm
blob
6d58010eb0ca54bf4e1169fb723f6c0aca7dfc2c
1
// { 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
}