2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / recursion1.f90
blob0cae26173f69c45b3434948728142bc683d16e77
1 ! { dg-do run }
2 ! { dg-options "-fcheck=recursion" }
4 ! PR 42517: Bogus runtime error with -fopenmp -fcheck=recursion
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
8 implicit none
9 integer :: i,s
11 s=0
12 !$omp parallel do private(i) shared(s)
13 do i=1,10
14 call sub(i)
15 end do
16 !$omp end parallel do
17 if (s/=55) call abort()
19 contains
21 subroutine sub (n)
22 integer :: n
23 !$omp atomic
24 s = s + n
25 print '(A,i3)',"loop =",n
26 end subroutine
28 end