diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/gomp/pr81011.C')
-rw-r--r-- | gcc/testsuite/g++.dg/gomp/pr81011.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/gomp/pr81011.C b/gcc/testsuite/g++.dg/gomp/pr81011.C new file mode 100644 index 00000000000..4abd609596c --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr81011.C @@ -0,0 +1,19 @@ +// PR c++/81011 +// { dg-do compile } + +class A { A (const A&); }; // { dg-message "declared private here" } +void foo (const A&); + +void +bar (A& a) +{ +#pragma omp task // { dg-error "is private within this context" } + foo (a); +} + +void +baz (A& a) +{ +#pragma omp task firstprivate (a) // { dg-error "is private within this context" } + foo (a); +} |