(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
loongarch/
func-call-medium-6.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-mabi=lp64d -O0 -fno-pic -fplt -mexplicit-relocs -mcmodel=medium" } */
       3  /* { dg-final { scan-assembler "test:.*pcalau12i.*%pc_hi20\\(g\\)\n\tjirl.*pc_lo12\\(g\\)" } } */
       4  /* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
       5  /* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
       6  /* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
       7  
       8  extern void g (void);
       9  
      10  void
      11  f (void)
      12  {}
      13  
      14  static void
      15  l (void)
      16  {}
      17  
      18  void
      19  test (void)
      20  {
      21    g ();
      22  }
      23  
      24  void
      25  test1 (void)
      26  {
      27    f ();
      28  }
      29  
      30  void
      31  test2 (void)
      32  {
      33    l ();
      34  }
      35  
      36  __attribute__ ((tls_model ("global-dynamic"))) __thread int a;
      37  
      38  void
      39  test3 (void)
      40  {
      41    a = 10;
      42  }