| 1 |
module m |
| 2 |
integer ::x |
| 3 |
! Nonsense but OpenMP-semantically valid: |
| 4 |
!$omp assumes contains(target) holds(x > 0.0) |
| 5 |
!$omp assumes absent(target) |
| 6 |
!$omp assumes holds(0.0) |
| 7 |
! { dg-error "HOLDS expression at .1. must be a scalar logical expression" "" { target *-*-* } .-1 } |
| 8 |
end module |
| 9 |
|
| 10 |
module m2 |
| 11 |
interface |
| 12 |
subroutine foo |
| 13 |
!$omp assumes contains(target) contains(teams,target) ! { dg-error "'TARGET' directive mentioned multiple times in CONTAINS clause in !.OMP ASSUMES directive" } |
| 14 |
!$omp assumes absent(declare target) ! { dg-error "Invalid 'DECLARE TARGET' directive at .1. in ABSENT clause: declarative, informational, and meta directives not permitted" } |
| 15 |
!$omp assumes absent(parallel) absent(do,simd,parallel,distribute) ! { dg-error "'PARALLEL' directive mentioned multiple times in ABSENT clause in !.OMP ASSUMES directive" } |
| 16 |
!$omp assumes contains(barrier,atomic) absent(cancel,simd,atomic,distribute) ! { dg-error "'SIMD' directive mentioned both times in ABSENT and CONTAINS clauses in !.OMP ASSUMES directive" } |
| 17 |
end subroutine foo |
| 18 |
end interface |
| 19 |
end module m2 |