Implementation details:
The UNTIED clause is recognized by setting the flag=0 for the default
case or performing logical OR to flag if other clauses are specified,
and this flag is passed as an argument to the `__kmpc_omp_task_alloc`
runtime call.
Resubmitting the PR with fix for the failure, as it was reverted here:
927a70daf3
and previously merged here: https://github.com/llvm/llvm-project/pull/115283
29 lines
1.0 KiB
Fortran
29 lines
1.0 KiB
Fortran
! RUN: %python %S/../test_errors.py %s %flang -fopenmp
|
|
!
|
|
! OpenMP 5.2: 5.2 threadprivate directive restriction
|
|
|
|
subroutine task_untied01()
|
|
integer, save :: var_01, var_02(2)
|
|
real :: var_03
|
|
common /c/ var_03
|
|
|
|
!$omp threadprivate(var_01, var_02)
|
|
!$omp threadprivate(/c/)
|
|
|
|
!$omp task untied
|
|
!ERROR: A THREADPRIVATE variable `var_01` cannot appear in an UNTIED TASK region
|
|
var_01 = 10
|
|
!ERROR: A THREADPRIVATE variable `var_02` cannot appear in an UNTIED TASK region
|
|
!ERROR: A THREADPRIVATE variable `var_01` cannot appear in an UNTIED TASK region
|
|
var_02(1) = sum([var_01, 20])
|
|
!$omp end task
|
|
|
|
!$omp task untied
|
|
!ERROR: A THREADPRIVATE variable `var_02` cannot appear in an UNTIED TASK region
|
|
!ERROR: A THREADPRIVATE variable `var_02` cannot appear in an UNTIED TASK region
|
|
var_02(2) = product(var_02)
|
|
!ERROR: A THREADPRIVATE variable `var_03` cannot appear in an UNTIED TASK region
|
|
var_03 = 3.14
|
|
!$omp end task
|
|
end subroutine task_untied01
|