doc: Drop GCC 2.6 ABI change note for H8/h8300-hms
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / unroll-5.f90
blob392855120999916961d3555693d03c6625a79ea9
1 ! { dg-do run }
2 ! { dg-additional-options "-g" }
4 module test_functions
5 contains
6 integer function compute_sum4 (step,n) result(sum)
7 implicit none
8 integer :: i, step, n
10 sum = 0
11 !$omp parallel do reduction(+:sum) private(i)
12 !$omp unroll partial(5)
13 do i = 1,n,step
14 sum = sum + 1
15 end do
16 end function compute_sum4
17 end module test_functions
19 program test
20 use test_functions
21 implicit none
22 integer :: result
24 result = compute_sum4 (1, 100)
25 if (result .ne. 100) then
26 stop 1
27 end if
29 result = compute_sum4 (1, 9)
30 if (result .ne. 9) then
31 stop 2
32 end if
34 result = compute_sum4 (2, 96)
35 if (result .ne. 48) then
36 stop 3
37 end if
39 result = compute_sum4 (-2, -98)
40 if (result .ne. 50) then
41 stop 4
42 end if
44 result = compute_sum4 (-2, -100)
45 if (result .ne. 51) then
46 stop 5
47 end if
48 end program