1  /* { dg-do compile { target { ! ia32 } } } */
       2  /* { dg-require-effective-target maybe_x32 } */
       3  /* { dg-options "-O2 -mx32 -maddress-mode=long" } */
       4  
       5  extern void abort (void);
       6  static __thread unsigned char foo [32]
       7  __attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
       8  
       9  void
      10  test2 (void)
      11  {
      12    unsigned int s;
      13    for (s = 0; s < sizeof (foo); ++s)
      14      {
      15        if (foo [s] != s)
      16  	abort ();
      17        foo [s] = sizeof (foo) - s;
      18      }
      19  }