d: Add language reference section to documentation files.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / pr29629.f90
blob1920ac0b4a3ec2af2c43e1b681dc2f3cd83f5cf8
1 ! PR fortran/29629
2 ! { dg-do run }
4 program pr29629
5 integer :: n
6 n = 10000
7 if (any (func(n).ne.10000)) stop 1
8 contains
9 function func(n)
10 integer, intent(in) :: n
11 integer, dimension(n) :: func
12 integer :: k
13 func = 0
14 !$omp parallel do private(k), reduction(+:func), num_threads(4)
15 do k = 1, n
16 func = func + 1
17 end do
18 !$omp end parallel do
19 end function
20 end program