1 /* { dg-do compile } */
2 /* { dg-require-effective-target tls } */
5 #pragma omp threadprivate (thrglobalvar)
17 /* const qualified type, but mutable member -> not predetermined. */
22 } constmutvar = { 6, 4 };
46 #pragma omp threadprivate (thrlocvar)
55 #pragma omp parallel for /* { dg-error "enclosing parallel" } */ \
56 default (none) private (p) shared (s)
57 for (i = 0; i < 64; i++)
59 int k = foo (0); /* Predetermined - private (automatic var declared */
60 k++; /* in scope of construct). */
61 thrglobalvar++; /* Predetermined - threadprivate. */
62 thrlocvar++; /* Predetermined - threadprivate. */
63 foo (i); /* Predetermined - private (omp for loop variable). */
64 foo (constvar.x); /* Predetermined - shared (const qualified type). */
65 foo (T::t.i); /* Predetermined - shared (static data member). */
66 foo (*p); /* *p predetermined - shared (heap allocated */
67 (*p)++; /* storage). */
68 bar (p); /* Explicitly determined - private. */
69 foo (s); /* Explicitly determined - shared. */
70 globalvar++; /* { dg-error "not specified in" } */
71 locvar++; /* { dg-error "not specified in" } */
72 l++; /* { dg-error "not specified in" } */
73 for (j = 0; j < 2; j++); /* { dg-error "not specified in" } */
74 baz (constmutvar);/* { dg-error "not specified in" } */