Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / workshare03.f90
blob09d46abf42eec88fde0cb95966eedf08f581f79c
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.4 workshare Construct
4 ! All array assignments, scalar assignments, and masked array assignments
5 ! must be intrinsic assignments.
7 module defined_assign
8 interface assignment(=)
9 module procedure work_assign
10 end interface
12 contains
13 subroutine work_assign(a,b)
14 integer, intent(out) :: a
15 logical, intent(in) :: b(:)
16 end subroutine work_assign
17 end module defined_assign
19 program omp_workshare
20 use defined_assign
22 integer :: a, aa(10), bb(10)
23 logical :: l(10)
24 l = .TRUE.
26 !$omp workshare
27 !ERROR: Defined assignment statement is not allowed in a WORKSHARE construct
28 a = l
29 aa = bb
30 !$omp end workshare
32 end program omp_workshare