blob: cf294c2fc1879d3004ae66b85cc41790aca7bea4 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int i, j;
void
f1 (void)
{
#pragma omp for linear (i:1) /* { dg-error "iteration variable .i. should not be linear" } */
for (i = 0; i < 32; i++)
;
}
void
f2 (void)
{
#pragma omp distribute parallel for linear (i:1) /* { dg-error ".linear. is not valid for .#pragma omp distribute parallel for." } */
for (i = 0; i < 32; i++)
;
}
void
f3 (void)
{
#pragma omp parallel for linear (i:1) collapse(1) /* { dg-error "iteration variable .i. should not be linear" } */
for (i = 0; i < 32; i++)
;
}
void
f4 (void)
{
#pragma omp for linear (i:1) linear (j:2) collapse(2) /* { dg-error "iteration variable .i. should not be linear" } */
for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 33 } */
for (j = 0; j < 32; j+=2)
;
}
void
f5 (void)
{
#pragma omp target teams distribute parallel for linear (i:1) linear (j:2) collapse(2) /* { dg-error ".linear. is not valid for .#pragma omp target teams distribute parallel for." } */
for (i = 0; i < 32; i++)
for (j = 0; j < 32; j+=2)
;
}
void
f6 (void)
{
#pragma omp parallel for linear (i:1) collapse(2) linear (j:2) /* { dg-error "iteration variable .i. should not be linear" } */
for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 51 } */
for (j = 0; j < 32; j+=2)
;
}
#pragma omp declare target to (i, j, f2)
|