1 /* Invalid initializations. */ 2 /* { dg-require-effective-target tls } */ 3 4 extern __thread int i; 5 __thread int *p = &i; /* { dg-error "dynamic initialization" } */ 6 7 extern int f(); 8 __thread int j = f(); /* { dg-error "dynamic initialization" } */ 9 10 struct S 11 { 12 S(); 13 }; 14 __thread S s; /* { dg-error "dynamic initialization" } */ 15