1/* Invalid initializations. */ 2/* { dg-require-effective-target tls } */ 3 4__thread int i = 42; 5 6static int j; 7__thread int *p = &j; 8 9/* Note that this is valid in C++ (unlike C) as a run-time initialization. */ 10int *q = &i; 11 12/* Valid because "const int k" is an integral constant expression in C++. */ 13__thread const int k = 42; 14__thread const int l = k;