C++: simplify output from suggest_alternatives_for
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / recursion1.f90
blobc9aec7e415964157506caaeb9fa1bf140ceb7237
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) STOP 1
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