a70ad3bb3e
PR middle-end/25261 PR middle-end/28790 * tree-nested.c (struct nesting_info): Added static_chain_added. (convert_call_expr): Set static_chain_added when adding static chain. Handle OMP_PARALLEL and OMP_SECTION. * gcc.dg/gomp/nestedfn-1.c: New test. * testsuite/libgomp.c/nestedfn-4.c: New test. * testsuite/libgomp.c/nestedfn-5.c: New test. * testsuite/libgomp.fortran/nestedfn3.f90: New test. From-SVN: r117235
25 lines
390 B
Fortran
25 lines
390 B
Fortran
! 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
|