gcc/testsuite/gcc.target/arc/pr89838.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target tls } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | extern void foo (void); |
| 6 | extern void bar (void *); |
| 7 | |
| 8 | struct { |
| 9 | int __attribute__(()) a; |
| 10 | int __attribute__(()) b; |
| 11 | } __thread c __attribute__((tls_model("initial-exec"))); |
| 12 | |
| 13 | void foo (void) |
| 14 | { |
| 15 | bar (&c.b); |
| 16 | } |