gcc/testsuite/gcc.target/loongarch/explicit-relocs-auto-tls-desc.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fPIC -mexplicit-relocs=auto -mtls-dialect=desc" } */ |
| 3 | |
| 4 | __thread int a __attribute__((visibility("hidden"))); |
| 5 | extern __thread int b __attribute__((visibility("default"))); |
| 6 | |
| 7 | int test() { return a + b; } |
| 8 | |
| 9 | /* { dg-final { scan-assembler "la\\.tls\\.desc\t\\\$r4,\\.LANCHOR0" { target tls_native } } } */ |
| 10 | /* { dg-final { scan-assembler "la\\.tls\\.desc\t\\\$r4,\\.LANCHOR0" { target tls_native } } } */ |