diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/tls/thread_local-wrap3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/tls/thread_local-wrap3.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C b/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C new file mode 100644 index 00000000000..19e6ab8d0d9 --- /dev/null +++ b/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C @@ -0,0 +1,14 @@ +// If we can't see the definition at all, we need to assume there might be +// an init function. + +// { dg-require-effective-target tls } +// { dg-options "-std=c++11" } +// { dg-final { scan-assembler "_ZTW1i" } } +// { dg-final { scan-assembler "_ZTH1i" } } + +extern thread_local int i; + +int main() +{ + return i - 42; +} |