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__((visibility("hidden")))
8 __attribute__((tls_model("global-dynamic")))
9 __thread int x;
10
11 void reference() { x++; }
12
13 /* { dg-final { scan-ipa-dump "Varpool flags: tls-global-dynamic" "whole-program" } } */