brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 9667a30 Raw
34 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 4.53! 2.7.4 workshare Construct4! Invalid do construct inside !$omp workshare5 6subroutine workshare(aa, bb, cc, dd, ee, ff, n)7  integer n, i8  real aa(n,n), bb(n,n), cc(n,n), dd(n,n), ee(n,n), ff(n,n)9 10  !ERROR: The structured block in a WORKSHARE construct may consist of only SCALAR or ARRAY assignments, FORALL or WHERE statements, FORALL, WHERE, ATOMIC, CRITICAL or PARALLEL constructs11  !ERROR: OpenMP constructs enclosed in WORKSHARE construct may consist of ATOMIC, CRITICAL or PARALLEL constructs only12  !$omp workshare13  do i = 1, n14    print *, "omp workshare"15  end do16 17  !$omp critical18  !ERROR: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region19  !$omp single20  aa = bb21  !$omp end single22  !$omp end critical23 24  !$omp parallel25  !$omp single26  cc = dd27  !$omp end single28  !$omp end parallel29 30  ee = ff31  !$omp end workshare32 33end subroutine workshare34