comparison libgomp/testsuite/libgomp.fortran/recursion1.f90 @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents
children 04ced10e8804
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 ! { dg-do run }
2 ! { dg-options "-fopenmp -fcheck=recursion" }
3 !
4 ! PR 42517: Bogus runtime error with -fopenmp -fcheck=recursion
5 !
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7
8 implicit none
9 integer :: i,s
10
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()
18
19 contains
20
21 subroutine sub (n)
22 integer :: n
23 !$omp atomic
24 s = s + n
25 print '(A,i3)',"loop =",n
26 end subroutine
27
28 end