blob: 8d8988fccc348a5d0af7cd02b400618756bffb47 [file] [log] [blame]
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-require-effective-target maybe_x32 } */
/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
extern void abort (void);
static __thread unsigned char foo [32]
__attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
void
test2 (void)
{
unsigned int s;
for (s = 0; s < sizeof (foo); ++s)
{
if (foo [s] != s)
abort ();
foo [s] = sizeof (foo) - s;
}
}