gcc/testsuite/objc.dg/tls/init-2.m
raw| 1 | /* Invalid initializations. */ |
| 2 | /* { dg-require-effective-target tls } */ |
| 3 | |
| 4 | extern __thread int i; |
| 5 | __thread int *p = &i; /* { dg-error "initializer element is not constant" } */ |
| 6 | |
| 7 | extern int f(); |
| 8 | __thread int j = f(); /* { dg-error "initializer element is not constant" } */ |
| 9 | |
| 10 | struct S |
| 11 | { |
| 12 | S(); /* { dg-error "expected specifier-qualifier-list before 'S'" } */ |
| 13 | }; |
| 14 | __thread S s; /* { dg-error "unknown type name" } */ |