brintos

brintos / llvm-project-archived public Read only

0
0
Text · 915 B · 6de3a55 Raw
35 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=602! OpenMP Version 6.03! workdistribute Construct4! The !omp workdistribute construct must not contain any user defined5! function calls unless the function is ELEMENTAL.6 7module my_mod8  contains9  integer function my_func()10    my_func = 1011  end function my_func12 13  impure integer function impure_my_func()14    impure_my_func = 2015  end function impure_my_func16 17  impure elemental integer function impure_ele_my_func()18    impure_ele_my_func = 2019  end function impure_ele_my_func20end module my_mod21 22subroutine workdistribute(aa, bb, cc, n)23  use my_mod24  integer n25  real aa(n), bb(n), cc(n)26  !$omp teams27  !$omp workdistribute28  !ERROR: User defined non-ELEMENTAL function 'my_func' is not allowed in a WORKDISTRIBUTE construct29  aa = my_func()30  aa = bb * cc31  !$omp end workdistribute32  !$omp end teams33 34end subroutine workdistribute35