| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
class C { int a; char b; void foo (); }; |
| 4 |
|
| 5 |
void |
| 6 |
C::foo () |
| 7 |
{ |
| 8 |
#pragma omp parallel shared (a, a) // { dg-error "appears more than once in data clauses" } |
| 9 |
; |
| 10 |
#pragma omp parallel shared (a) private (b) shared(C::a) // { dg-error "appears more than once in data clauses" } |
| 11 |
; |
| 12 |
#pragma omp task private (a) private (b) |
| 13 |
; |
| 14 |
#pragma omp task firstprivate (a) shared (C::a) // { dg-error "appears more than once in data clauses" } |
| 15 |
; |
| 16 |
#pragma omp parallel for lastprivate (b) firstprivate (a) lastprivate (b) // { dg-error "appears more than once in data clauses" } |
| 17 |
for (int i = 0; i < 64; i++) |
| 18 |
; |
| 19 |
#pragma omp parallel for lastprivate (b) firstprivate (b) |
| 20 |
for (int i = 0; i < 64; i++) |
| 21 |
; |
| 22 |
} |