2 // { dg-require-effective-target tls_runtime }
15 B& operator=(const B &);
21 static unsigned cmask[THR];
22 static unsigned dmask[THR];
24 #pragma omp threadprivate(threadbase)
33 unsigned index = &b - base;
35 cmask[omp_get_thread_num()] |= 1u << index;
42 unsigned index = this - threadbase;
44 dmask[omp_get_thread_num()] |= 1u << index;
54 #pragma omp parallel firstprivate(b)
56 assert (omp_get_num_threads () == THR);
66 omp_set_num_threads (THR);
69 for (int i = 0; i < THR; ++i)
71 unsigned xmask = (1u << N) - 1;
72 assert (cmask[i] == xmask);
73 assert (dmask[i] == xmask);