Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/explicit-relocs-auto-tls-ld-gd.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fPIC -mexplicit-relocs=auto -mtls-dialect=trad" } */
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\\.ld" { target tls_native } } } */
10 /* { dg-final { scan-assembler "la\\.tls\\.gd" { target tls_native } } } */