blob: e7734a0badf36ad1d2cbdb0cf2ea91309d9bb491 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// { dg-options "-std=c++11" }
// { dg-require-effective-target tls }
// The variable should have a guard.
// { dg-final { scan-assembler "_ZGVZ1fvE1a" } }
// But since it's thread local we don't need to guard against
// simultaneous execution.
// { dg-final { scan-assembler-not "cxa_guard" } }
// The guard should be TLS, not local common.
// { dg-final { scan-assembler-not "\.comm" } }
struct A
{
A();
};
A &f()
{
thread_local A a;
return a;
}
|