Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O0 -fno-plt -mcmodel=normal -mtls-dialect=trad -mexplicit-relocs" } */
3 /* { dg-final { scan-assembler "pcalau12i\t.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
4
5 __attribute__ ((tls_model ("global-dynamic"))) __thread int a;
6
7 void
8 test (void)
9 {
10 a = 10;
11 }
12