C++: simplify output from suggest_alternatives_for
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / pr27395-2.f90
blobf55b701cdb4285b5ec1654819f7b477a7f1fd97d
1 ! PR fortran/27395
2 ! { dg-do run }
4 program pr27395_2
5 implicit none
6 integer, parameter :: n=10,m=1001
7 integer :: i
8 call foo(n,m)
9 end program pr27395_2
11 subroutine foo(n,m)
12 use omp_lib, only : omp_get_thread_num
13 implicit none
14 integer, intent(in) :: n,m
15 integer :: i,j
16 integer, dimension(n) :: sumarray
17 sumarray(:)=0
18 !$OMP PARALLEL DEFAULT(shared) NUM_THREADS(4)
19 !$OMP DO PRIVATE(j,i), REDUCTION(+:sumarray)
20 do j=1,m
21 do i=1,n
22 sumarray(i)=sumarray(i)+i
23 end do
24 end do
25 !$OMP END DO
26 !$OMP END PARALLEL
27 do i=1,n
28 if (sumarray(i).ne.m*i) STOP 1
29 end do
30 end subroutine foo