Debian Codegraph @

gcc/testsuite/g++.dg/gomp/tls-wrap2.C

raw
1 // If we can't see the definition at the use site, but it's in this translation
2 // unit, we build a wrapper but don't bother with an init function.
3
4 // { dg-require-effective-target tls }
5 // { dg-final { scan-assembler "_ZTW1i" } }
6 // { dg-final { scan-assembler-not "_ZTH1i" } }
7
8 extern int i;
9 #pragma omp threadprivate (i)
10
11 int main()
12 {
13 return i - 42;
14 }
15
16 int i = 42;