1135380Sglebius// { dg-do compile } 2135380Sglebius// { dg-require-effective-target tls_native } 3135380Sglebius 4135380Sglebius#define thr threadprivate 5223788Sglebius 6223788Sglebiusint i; 7135380Sglebius#pragma omp thr (i) 8135408Sglebiusnamespace N 9135380Sglebius{ 10135380Sglebius int j; 11135380Sglebius#pragma omp thr (j) 12135380Sglebius}; 13135380Sglebiusstruct S 14223788Sglebius{ 15223788Sglebius static int s; 16223788Sglebius#pragma omp thr (s) 17223824Spluknet}; 18223824Spluknet 19223824Spluknetint S::s = 5; 20223788Sglebius 21135380Sglebiusint 22foo () 23{ 24 static int k; 25#pragma omp thr (k) 26 return k++ + S::s; 27} 28