Retro68/gcc/libgomp/testsuite/libgomp.fortran/nestedfn3.f90

25 lines
386 B
Fortran
Raw Normal View History

2012-03-27 23:13:14 +00:00
! PR middle-end/28790
! { dg-do run }
program nestomp
integer :: j
j = 8
call bar
2018-12-28 15:30:48 +00:00
if (j.ne.10) STOP 1
2012-03-27 23:13:14 +00:00
contains
subroutine foo (i)
integer :: i
!$omp atomic
j = j + i - 5
end subroutine
subroutine bar
use omp_lib
integer :: i
i = 6
call omp_set_dynamic (.false.)
!$omp parallel num_threads (2)
call foo(i)
!$omp end parallel
end subroutine
end