32 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2 3module new_operator4 implicit none5 6 interface operator(.MYOPERATOR.)7 module procedure myprocedure8 end interface9contains10 pure integer function myprocedure(param1, param2)11 integer, intent(in) :: param1, param212 myprocedure = param1 + param213 end function14end module15 16program sample17 use new_operator18 implicit none19 integer :: x, y 20 21 !$omp atomic update22 x = x / y23 24 !$omp atomic update25 !ERROR: A call to this function is not a valid ATOMIC UPDATE operation26 x = x .MYOPERATOR. y27 28 !$omp atomic29 !ERROR: A call to this function is not a valid ATOMIC UPDATE operation30 x = x .MYOPERATOR. y31end program32