aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls/vis-attr-gd.c
blob: 89a248a8028dc606807025de9cefc4c96cab4d8c (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 global-dynamic due to explicitly specified attribute
__attribute__((tls_model("global-dynamic")))
__thread int x;

void reference() { x++; }

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