Fix ifunc detection in target-supports.exp file.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / taskgroup1.f90
blob018d3e83b92df4e2d494fc56b82b2dd465493a4e
1 integer :: v(16), i
2 do i = 1, 16
3 v(i) = i
4 end do
6 !$omp parallel num_threads (4)
7 !$omp single
8 !$omp taskgroup
9 do i = 1, 16, 2
10 !$omp task
11 !$omp task
12 v(i) = v(i) + 1
13 !$omp end task
14 !$omp task
15 v(i + 1) = v(i + 1) + 1
16 !$omp end task
17 !$omp end task
18 end do
19 !$omp end taskgroup
20 do i = 1, 16
21 if (v(i).ne.(i + 1)) call abort
22 end do
23 !$omp taskgroup
24 do i = 1, 16, 2
25 !$omp task
26 !$omp task
27 v(i) = v(i) + 1
28 !$omp endtask
29 !$omp task
30 v(i + 1) = v(i + 1) + 1
31 !$omp endtask
32 !$omp taskwait
33 !$omp endtask
34 end do
35 !$omp endtaskgroup
36 do i = 1, 16
37 if (v(i).ne.(i + 2)) call abort
38 end do
39 !$omp taskgroup
40 do i = 1, 16, 2
41 !$omp task
42 !$omp task
43 v(i) = v(i) + 1
44 !$omp end task
45 v(i + 1) = v(i + 1) + 1
46 !$omp end task
47 end do
48 !$omp taskwait
49 do i = 1, 16, 2
50 !$omp task
51 v(i + 1) = v(i + 1) + 1
52 !$omp end task
53 end do
54 !$omp end taskgroup
55 do i = 1, 16, 2
56 if (v(i).ne.(i + 3)) call abort
57 if (v(i + 1).ne.(i + 5)) call abort
58 end do
59 !$omp taskgroup
60 do i = 1, 16, 2
61 !$omp taskgroup
62 !$omp task
63 v(i) = v(i) + 1
64 !$omp end task
65 !$omp task
66 v(i + 1) = v(i + 1) + 1
67 !$omp end task
68 !$omp end taskgroup
69 if (v(i).ne.(i + 4).or.v(i + 1).ne.(i + 6)) call abort
70 !$omp task
71 v(i) = v(i) + 1
72 !$omp end task
73 end do
74 !$omp end taskgroup
75 do i = 1, 16
76 if (v(i).ne.(i + 5)) call abort
77 end do
78 !$omp end single
79 !$omp end parallel
80 end