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
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tls
/
static-1.C
blob
506b0fcf7a0eecde254bb7b7643e0566467c990e
1
// { dg-do run }
2
// { dg-options "-O2" }
3
// { dg-require-effective-target tls_runtime }
4
// { dg-add-options tls }
5
// { dg-additional-sources "static-1a.cc" }
6
7
extern "C" void abort ();
8
extern int test ();
9
10
struct A
11
{
12
static __thread int i;
13
};
14
15
__thread int A::i = 8;
16
17
int
18
main ()
19
{
20
if (A::i != 8)
21
abort ();
22
23
if (test ())
24
abort ();
25
26
if (A::i != 17)
27
abort ();
28
29
return 0;
30
}