gcc/testsuite/g++.dg/tls/thread_local-wrap3.C
raw| 1 | // If we can't see the definition at all, we need to assume there might be |
| 2 | // an init function. |
| 3 | |
| 4 | // { dg-do compile { target c++11 } } |
| 5 | // { dg-require-alias "" } |
| 6 | // { dg-require-effective-target tls } |
| 7 | // { dg-final { scan-assembler "_ZTW1i" } } |
| 8 | // { dg-final { scan-assembler "_ZTH1i" } } |
| 9 | |
| 10 | extern thread_local int i; |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | return i - 42; |
| 15 | } |