]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c
* builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / gomp / schedule-modifiers-1.c
CommitLineData
9561765e 1/* { dg-do compile } */
2/* { dg-options "-fopenmp" } */
3
4void
5foo (void)
6{
7 int i;
8 #pragma omp for simd schedule (simd, simd: static, 5)
9 for (i = 0; i < 64; i++)
10 ;
11 #pragma omp for simd schedule (monotonic, simd: static)
12 for (i = 0; i < 64; i++)
13 ;
14 #pragma omp for simd schedule (simd , monotonic : static, 6)
15 for (i = 0; i < 64; i++)
16 ;
17 #pragma omp for schedule (monotonic, monotonic : static, 7)
18 for (i = 0; i < 64; i++)
19 ;
20 #pragma omp for schedule (nonmonotonic, nonmonotonic : dynamic)
21 for (i = 0; i < 64; i++)
22 ;
23 #pragma omp for simd schedule (nonmonotonic , simd : dynamic, 3)
24 for (i = 0; i < 64; i++)
25 ;
26 #pragma omp for simd schedule (nonmonotonic,simd:guided,4)
27 for (i = 0; i < 64; i++)
28 ;
29 #pragma omp for schedule (monotonic: static, 2)
30 for (i = 0; i < 64; i++)
31 ;
32 #pragma omp for schedule (monotonic : static)
33 for (i = 0; i < 64; i++)
34 ;
35 #pragma omp for schedule (monotonic : dynamic)
36 for (i = 0; i < 64; i++)
37 ;
38 #pragma omp for schedule (monotonic : dynamic, 3)
39 for (i = 0; i < 64; i++)
40 ;
41 #pragma omp for schedule (monotonic : guided)
42 for (i = 0; i < 64; i++)
43 ;
44 #pragma omp for schedule (monotonic : guided, 7)
45 for (i = 0; i < 64; i++)
46 ;
47 #pragma omp for schedule (monotonic : runtime)
48 for (i = 0; i < 64; i++)
49 ;
50 #pragma omp for schedule (monotonic : auto)
51 for (i = 0; i < 64; i++)
52 ;
53 #pragma omp for schedule (nonmonotonic : dynamic)
54 for (i = 0; i < 64; i++)
55 ;
56 #pragma omp for schedule (nonmonotonic : dynamic, 3)
57 for (i = 0; i < 64; i++)
58 ;
59 #pragma omp for schedule (nonmonotonic : guided)
60 for (i = 0; i < 64; i++)
61 ;
62 #pragma omp for schedule (nonmonotonic : guided, 7)
63 for (i = 0; i < 64; i++)
64 ;
65}
66
67void
68bar (void)
69{
70 int i;
7e5a76c8 71 #pragma omp for schedule (nonmonotonic: static, 2)
9561765e 72 for (i = 0; i < 64; i++)
73 ;
7e5a76c8 74 #pragma omp for schedule (nonmonotonic : static)
9561765e 75 for (i = 0; i < 64; i++)
76 ;
7e5a76c8 77 #pragma omp for schedule (nonmonotonic : runtime)
9561765e 78 for (i = 0; i < 64; i++)
79 ;
7e5a76c8 80 #pragma omp for schedule (nonmonotonic : auto)
9561765e 81 for (i = 0; i < 64; i++)
82 ;
7e5a76c8 83 #pragma omp for schedule (nonmonotonic : static) ordered /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
84 for (i = 0; i < 64; i++)
85 #pragma omp ordered
86 ;
87 #pragma omp for ordered schedule (nonmonotonic: static, 4) /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
88 for (i = 0; i < 64; i++)
89 #pragma omp ordered
90 ;
3acdf4ff 91 #pragma omp for schedule (nonmonotonic : dynamic) ordered /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
9561765e 92 for (i = 0; i < 64; i++)
93 #pragma omp ordered
94 ;
3acdf4ff 95 #pragma omp for ordered schedule(nonmonotonic : dynamic, 5) /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
9561765e 96 for (i = 0; i < 64; i++)
97 #pragma omp ordered
98 ;
3acdf4ff 99 #pragma omp for schedule (nonmonotonic : guided) ordered(1) /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
9561765e 100 for (i = 0; i < 64; i++)
101 {
102 #pragma omp ordered depend(sink: i - 1)
103 #pragma omp ordered depend(source)
104 }
3acdf4ff 105 #pragma omp for ordered(1) schedule(nonmonotonic : guided, 2) /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
7e5a76c8 106 for (i = 0; i < 64; i++)
107 {
108 #pragma omp ordered depend(source)
109 #pragma omp ordered depend(sink: i - 1)
110 }
111 #pragma omp for schedule(nonmonotonic : runtime) ordered(1) /* { dg-error ".nonmonotonic. schedule modifier specified together with .ordered. clause" } */
9561765e 112 for (i = 0; i < 64; i++)
113 {
114 #pragma omp ordered depend(source)
115 #pragma omp ordered depend(sink: i - 1)
116 }
117 #pragma omp for schedule (nonmonotonic , monotonic : dynamic) /* { dg-error "both .monotonic. and .nonmonotonic. modifiers specified" } */
118 for (i = 0; i < 64; i++)
119 ;
120 #pragma omp for schedule (monotonic,nonmonotonic:dynamic) /* { dg-error "both .monotonic. and .nonmonotonic. modifiers specified" } */
121 for (i = 0; i < 64; i++)
122 ;
123}