Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.fortran/cancel-taskgroup-2.f90
2023-03-06 14:48:14 +01:00

28 lines
539 B
Fortran

! { dg-do run }
! { dg-set-target-env-var OMP_CANCELLATION "true" }
use omp_lib
integer :: i
!$omp parallel
!$omp taskgroup
!$omp task
!$omp cancel taskgroup
stop 1
!$omp endtask
!$omp endtaskgroup
!$omp endparallel
!$omp parallel private (i)
!$omp barrier
!$omp single
!$omp taskgroup
do i = 0, 49
!$omp task
!$omp cancellation point taskgroup
!$omp cancel taskgroup if (i.gt.5)
!$omp end task
end do
!$omp end taskgroup
!$omp endsingle
!$omp end parallel
end