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
/
thread_local9.C
blob
c75528a02915d2ba36bcfef08f5c708d44c6c17b
1
// PR c++/61343
2
3
// { dg-do run { target c++11 } }
4
// { dg-add-options tls }
5
// { dg-require-effective-target tls_runtime }
6
7
struct Foo {
8
int value;
9
10
Foo() noexcept {
11
value = 12;
12
}
13
};
14
15
static thread_local Foo a{};
16
17
static __attribute__((noinline)) void UseA() {
18
if (a.value != 12) __builtin_abort();
19
}
20
21
int main() {
22
UseA();
23
}