1 /* { dg-do run } */ 2 /* { dg-require-effective-target tls_runtime } */ 3 /* { dg-add-options tls } */ 4 5 extern void abort (void); 6 7 __thread int tls_le __attribute__((tls_model("local-exec"))) = 3; 8 get_le(void)9int get_le (void) 10 { 11 return tls_le; 12 } 13 get_lep(void)14int *get_lep (void) 15 { 16 return &tls_le; 17 } 18 main(void)19int main (void) 20 { 21 int val; 22 23 val = get_le (); 24 if (val != 3) 25 abort (); 26 27 val = *get_lep (); 28 if (val != 3) 29 abort (); 30 31 return 0; 32 } 33