view libgomp/testsuite/libgomp.fortran/nestedfn3.f90 @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents a06113de4d67
children 84e7813d76e9
line wrap: on
line source

! PR middle-end/28790
! { dg-do run }

program nestomp
  integer :: j
  j = 8
  call bar
  if (j.ne.10) call abort
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