(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
tls/
thr-init-1.c
       1  /* { dg-do run } */
       2  /* { dg-require-effective-target tls_runtime } */
       3  /* { dg-add-options tls } */
       4  
       5  extern int printf (char *,...);
       6  extern void abort(void) ;
       7  
       8  int test_code(int b)
       9  {
      10  static __thread int fstat = 1;
      11    fstat += b ;
      12    return fstat;
      13  }
      14  
      15  int main (int ac, char *av[])
      16  {
      17    int a = test_code(1);
      18    
      19    if ( a != 2 )
      20      {
      21        printf ("a=%d\n", a) ;
      22        abort ();
      23      }
      24    
      25    return 0;
      26  }