PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / do1.f90
blobbb7b6d83e14284eb58f01d4b4be29f0af8dbfc25
1 ! { dg-do run }
3 integer, dimension (128) :: a, b
4 integer :: i
5 a = -1
6 b = -1
7 do i = 1, 128
8 if (i .ge. 8 .and. i .le. 15) then
9 b(i) = 1 * 256 + i
10 else if (i .ge. 19 .and. i .le. 23) then
11 b(i) = 2 * 256 + i
12 else if (i .ge. 28 .and. i .le. 38) then
13 if (iand (i, 1) .eq. 0) b(i) = 3 * 256 + i
14 else if (i .ge. 59 .and. i .le. 79) then
15 if (iand (i - 59, 3) .eq. 0) b(i) = 4 * 256 + i
16 else if (i .ge. 101 .and. i .le. 125) then
17 if (mod (i - 101, 12) .eq. 0) b(i) = 5 * 256 + i
18 end if
19 end do
21 !$omp parallel num_threads (4)
23 !$omp do
24 do i = 8, 15
25 a(i) = 1 * 256 + i
26 end do
28 !$omp do
29 do i = 23, 19, -1
30 a(i) = 2 * 256 + i
31 end do
33 !$omp do
34 do i = 28, 39, 2
35 a(i) = 3 * 256 + i
36 end do
38 !$omp do
39 do i = 79, 59, -4
40 a(i) = 4 * 256 + i
41 end do
43 !$omp do
44 do i = 125, 90, -12
45 a(i) = 5 * 256 + i
46 end do
48 !$omp end parallel
50 if (any (a .ne. b)) STOP 1
51 a = -1
53 !$omp parallel num_threads (4)
55 !$omp do schedule (static)
56 do i = 8, 15
57 a(i) = 1 * 256 + i
58 end do
60 !$omp do schedule (static, 1)
61 do i = 23, 19, -1
62 a(i) = 2 * 256 + i
63 end do
65 !$omp do schedule (static, 3)
66 do i = 28, 39, 2
67 a(i) = 3 * 256 + i
68 end do
70 !$omp do schedule (static, 6)
71 do i = 79, 59, -4
72 a(i) = 4 * 256 + i
73 end do
75 !$omp do schedule (static, 2)
76 do i = 125, 90, -12
77 a(i) = 5 * 256 + i
78 end do
80 !$omp end parallel
82 if (any (a .ne. b)) STOP 2
83 a = -1
85 !$omp parallel num_threads (4)
87 !$omp do schedule (dynamic)
88 do i = 8, 15
89 a(i) = 1 * 256 + i
90 end do
92 !$omp do schedule (dynamic, 4)
93 do i = 23, 19, -1
94 a(i) = 2 * 256 + i
95 end do
97 !$omp do schedule (dynamic, 1)
98 do i = 28, 39, 2
99 a(i) = 3 * 256 + i
100 end do
102 !$omp do schedule (dynamic, 2)
103 do i = 79, 59, -4
104 a(i) = 4 * 256 + i
105 end do
107 !$omp do schedule (dynamic, 3)
108 do i = 125, 90, -12
109 a(i) = 5 * 256 + i
110 end do
112 !$omp end parallel
114 if (any (a .ne. b)) STOP 3
115 a = -1
117 !$omp parallel num_threads (4)
119 !$omp do schedule (guided)
120 do i = 8, 15
121 a(i) = 1 * 256 + i
122 end do
124 !$omp do schedule (guided, 4)
125 do i = 23, 19, -1
126 a(i) = 2 * 256 + i
127 end do
129 !$omp do schedule (guided, 1)
130 do i = 28, 39, 2
131 a(i) = 3 * 256 + i
132 end do
134 !$omp do schedule (guided, 2)
135 do i = 79, 59, -4
136 a(i) = 4 * 256 + i
137 end do
139 !$omp do schedule (guided, 3)
140 do i = 125, 90, -12
141 a(i) = 5 * 256 + i
142 end do
144 !$omp end parallel
146 if (any (a .ne. b)) STOP 4
147 a = -1
149 !$omp parallel num_threads (4)
151 !$omp do schedule (runtime)
152 do i = 8, 15
153 a(i) = 1 * 256 + i
154 end do
156 !$omp do schedule (runtime)
157 do i = 23, 19, -1
158 a(i) = 2 * 256 + i
159 end do
161 !$omp do schedule (runtime)
162 do i = 28, 39, 2
163 a(i) = 3 * 256 + i
164 end do
166 !$omp do schedule (runtime)
167 do i = 79, 59, -4
168 a(i) = 4 * 256 + i
169 end do
171 !$omp do schedule (runtime)
172 do i = 125, 90, -12
173 a(i) = 5 * 256 + i
174 end do
176 !$omp end parallel
178 if (any (a .ne. b)) STOP 5