| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=loongarch64 -mabi=lp64d -O2 -mcmodel=extreme -mtls-dialect=trad -fno-plt -mexplicit-relocs=always -fdump-rtl-final" } */ |
| 3 |
|
| 4 |
int a; |
| 5 |
extern int b; |
| 6 |
__thread int c __attribute__ ((tls_model ("local-exec"))); |
| 7 |
__thread int d __attribute__ ((tls_model ("initial-exec"))); |
| 8 |
__thread int e __attribute__ ((tls_model ("local-dynamic"))); |
| 9 |
__thread int f __attribute__ ((tls_model ("global-dynamic"))); |
| 10 |
|
| 11 |
void |
| 12 |
test (void) |
| 13 |
{ |
| 14 |
a = b + c + d + e + f; |
| 15 |
} |
| 16 |
|
| 17 |
/* a, b, d, e, f, and __tls_get_addr. */ |
| 18 |
/* { dg-final { scan-rtl-dump-times "la_pcrel64_two_parts" 6 "final" } } */ |