1 /* Test C23 storage class specifiers in compound literals. Thread-local
2 cases, compilation tests, GNU __thread used. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu23" } */
5 /* { dg-require-effective-target tls } */
9 /* __thread is OK at file scope, although of limited use since the
10 thread-local object and its address are not constant expressions. */
11 size_t st
= sizeof (__thread
int) { 1 };
12 size_t sst
= sizeof (static __thread
int) { 1 };
17 return &(static __thread
int) { 2 };