1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  /* { dg-require-effective-target tls } */
       4  
       5  extern __thread int __libc_errno __attribute__ ((tls_model ("initial-exec")));
       6  ;
       7  int *
       8  __errno_location (void)
       9  {
      10    return &__libc_errno;
      11  }