diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/copyin-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/copyin-1.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/copyin-1.c b/gcc/testsuite/gcc.dg/gomp/copyin-1.c new file mode 100644 index 00000000000..117f82f8134 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/copyin-1.c @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-require-effective-target tls } + +int i, j; + +#pragma omp threadprivate (i) + +void bar(void); +void foo(void) +{ + int k; + extern int l; + extern int m; + +#pragma omp threadprivate (m) + + #pragma omp parallel copyin(i) + bar(); + #pragma omp parallel copyin(j) // { dg-error "threadprivate" } + bar(); + #pragma omp parallel copyin(k) // { dg-error "threadprivate" } + bar(); + #pragma omp parallel copyin(l) // { dg-error "threadprivate" } + bar(); + #pragma omp parallel copyin(m) + bar(); +} |