1 /* { dg-do assemble { target { ! ia32 } } } */
2 /* { dg-require-effective-target maybe_x32 } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-require-effective-target tls_native } */
5 /* { dg-options "-mx32 -fPIC -mtls-dialect=gnu2" } */
6 
7 extern __thread int bar;
8 static __thread int foo = 30;
9 
10 int *
test1(void)11 test1 (void)
12 {
13   __builtin_printf ("foo: %d\n", foo);
14   return &foo;
15 }
16 
17 int *
test2(void)18 test2 (void)
19 {
20   __builtin_printf ("bar: %d\n", bar);
21   return &bar;
22 }
23