gcc/testsuite/g++.dg/tls/thread_local-wrap1.C
raw| 1 | // If we can see the definition at the use site, we don't need to bother |
| 2 | // with a wrapper. |
| 3 | |
| 4 | // { dg-do compile { target c++11 } } |
| 5 | // { dg-require-effective-target tls } |
| 6 | // { dg-final { scan-assembler-not "_ZTW1i" } } |
| 7 | |
| 8 | thread_local int i = 42; |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | return i - 42; |
| 13 | } |