1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! 2.7.4 workshare Construct
4 ! Checks for OpenMP Parallel constructs enclosed in Workshare constructs
7 interface assignment(=)
8 module procedure work_assign
12 subroutine work_assign(a
,b
)
13 integer, intent(out
) :: a
14 logical, intent(in
) :: b(:)
15 end subroutine work_assign
17 integer function my_func()
21 end module workshare_mod
26 integer, parameter :: n
= 10
27 integer :: i
, j
, a(10), b(10)
31 real :: aa(n
,n
), bb(n
,n
), cc(n
,n
), dd(n
,n
), ee(n
,n
), ff(n
,n
)
43 !ERROR: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region
44 !$omp parallel sections
47 !$omp end parallel sections
56 where (dd
.lt
. 5) dd
= aa
* my_func()
61 end program omp_workshare