blob: c02df6919f1a2aac3cecee4994b7a93eba1ba015 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
/* { dg-require-effective-target tls } */
/* { dg-options "-O2 -fpic -fdump-ipa-whole-program" } */
__attribute__ ((tls_model ("local-exec"))) __thread int i;
int *
foo (void)
{
return &i;
}
/* tls_model should be local-exec due to tls_model attribute. */
/* { dg-final { scan-ipa-dump "Varpool flags: tls-local-exec" "whole-program" } } */