2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr52698.c
blobd84685cb3b7530df1664e99afeaee43f42d6a692
1 /* { dg-do compile { target { ! { ia32 } } } } */
2 /* { dg-options "-O2 -mx32 -maddress-mode=long" } */
4 extern void abort (void);
5 static __thread unsigned char foo [32]
6 __attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
8 void
9 test2 (void)
11 unsigned int s;
12 for (s = 0; s < sizeof (foo); ++s)
14 if (foo [s] != s)
15 abort ();
16 foo [s] = sizeof (foo) - s;