1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// { dg-do compile } // { dg-require-effective-target tls } int tp1; static int tp2; extern int tp3; int tp4 = 1; static int tp5 = 1; #pragma omp threadprivate (tp1, tp2, tp3, tp4, tp5) #pragma omp threadprivate (undef) // { dg-error "declared" } int tp6; int foo(void) { return tp6; } #pragma omp threadprivate (tp6) // { dg-error "after first use" }