! PR fortran/29629! { dg-do run }program pr29629integer::nn=10000if(any(func(n).ne.10000))call abortcontains function func(n)integer,intent(in)::ninteger,dimension(n)::funcinteger::kfunc=0!$omp parallel do private(k), reduction(+:func), num_threads(4)do k=1,nfunc=func+1end do!$omp end parallel doend functionend program