1! RUN: %S/test_errors.sh %s %t %f18 -fopenmp 2! XFAIL: * 3 4! OpenMP Version 4.5 5! 2.7.4 workshare Construct 6! The !omp workshare construct must not contain any user defined 7! function calls unless the function is ELEMENTAL. 8 9module my_mod 10 contains 11 function my_func(n) 12 integer :: my_func(n, n) 13 my_func = 10 14 end function my_func 15end module my_mod 16 17subroutine workshare(aa, bb, cc, dd, ee, ff, n) 18 use my_mod 19 integer n, i 20 real aa(n,n), bb(n,n), cc(n,n), dd(n,n), ee(n,n), ff(n,n) 21 22 !$omp workshare 23 !ERROR: Non-ELEMENTAL function is not allowed in !$omp workshare construct 24 aa = my_func(n) 25 cc = dd 26 ee = ff 27 !$omp end workshare 28 29end subroutine workshare 30