aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls/vis-attr-hidden.c
blob: 0d43fc565b090ed320e7da15024a46043c45700b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
/* { dg-require-effective-target tls } */
/* { dg-options "-O2 -fPIC -fdump-ipa-whole-program" } */

//tls_model should be local-dynamic due to visibility("hidden")
__attribute__((visibility("hidden")))
__thread int x;

void reference() { x++; }

/* { dg-final { scan-ipa-dump "Varpool flags: tls-local-dynamic" "whole-program" } } */