gcc/testsuite/gcc.dg/tls/vis-attr-gd.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target fpic } */ |
| 3 | /* { dg-require-effective-target tls } */ |
| 4 | /* { dg-options "-O2 -fPIC -fdump-ipa-whole-program" } */ |
| 5 | |
| 6 | // tls_model should be global-dynamic due to explicitly specified attribute |
| 7 | __attribute__((tls_model("global-dynamic"))) |
| 8 | __thread int x; |
| 9 | |
| 10 | void reference() { x++; } |
| 11 | |
| 12 | /* { dg-final { scan-ipa-dump "Varpool flags: tls-global-dynamic" "whole-program" } } */ |