2 // { dg-require-effective-target tls_runtime }
15 B& operator=(const B &);
19 #pragma omp threadprivate(threadbase)
24 static unsigned cmask[THR];
25 static unsigned dmask[THR];
34 unsigned index = &b - base;
36 cmask[omp_get_thread_num()] |= 1u << index;
43 unsigned index = this - threadbase;
45 dmask[omp_get_thread_num()] |= 1u << index;
55 #pragma omp parallel firstprivate(b)
57 assert (omp_get_num_threads () == THR);
67 omp_set_num_threads (THR);
70 for (int i = 0; i < THR; ++i)
72 unsigned xmask = (1u << N) - 1;
73 assert (cmask[i] == xmask);
74 assert (dmask[i] == xmask);