blob: 1229e61e8244b458535aca5ad585a41739979389 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
int a, b;
#pragma omp threadprivate (a, b)
void
foo (void)
{
#pragma omp for /* { dg-error "threadprivate iteration variable 'a'" } */
for (a = 0; a < 32; a++)
;
#pragma omp parallel for collapse(2) /* { dg-error "threadprivate iteration variable 'a'" "" { target c } } */
for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'b'" "" { target c } .-1 } */
for (b = 0; b < 32; b++) /* { dg-error "threadprivate iteration variable 'a'" "" { target c++ } .-1 } */
; /* { dg-error "threadprivate iteration variable 'b'" "" { target c++ } .-2 } */
#pragma omp simd /* { dg-error "threadprivate iteration variable 'a'" } */
for (a = 0; a < 32; a++)
;
#pragma omp taskloop /* { dg-error "threadprivate iteration variable 'a'" } */
for (a = 0; a < 32; a++)
;
#pragma omp loop bind(thread) /* { dg-error "threadprivate iteration variable 'a'" } */
for (a = 0; a < 32; a++)
;
}
void
bar (void)
{
#pragma omp distribute collapse(2) /* { dg-error "threadprivate iteration variable 'a'" } */
for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'b'" "" { target *-*-* } .-1 } */
for (b = 0; b < a; b++)
;
#pragma omp distribute parallel for simd /* { dg-error "threadprivate iteration variable 'a'" "" { target c } } */
for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'a'" "" { target c++ } } */
;
}
|