35 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2 3subroutine test_scan()4 integer x, y, k, z5 6 !ERROR: Orphaned SCAN directives are prohibited; perhaps you forgot to enclose the directive in to a WORKSHARING LOOP, a WORKSHARING LOOP SIMD or a SIMD directive.7 !ERROR: List item x must appear in REDUCTION clause with the INSCAN modifier of the parent directive8 !$omp scan inclusive(x)9 !$omp parallel do simd10 do k = 1, n11 !ERROR: UNTIED clause is not allowed on the SCAN directive12 !$omp scan untied13 end do14 15 !$omp parallel do simd16 do k = 1, n17 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected18 !$omp scan19 end do20 21!$omp parallel do simd reduction(inscan,+: x, y)22 do k = 1, n23 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected24 !$omp scan inclusive(x) exclusive(y)25 end do26 27!ERROR: List item y must appear in EXCLUSIVE or INCLUSIVE clause of an enclosed SCAN directive28!$omp parallel do simd reduction(inscan,+: x, y)29 do k = 1, n30 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected31 !ERROR: List item z must appear in REDUCTION clause with the INSCAN modifier of the parent directive32 !$omp scan inclusive(x) exclusive(z)33 end do34end subroutine35