aboutsummaryrefslogtreecommitdiff
path: root/flang/test/Semantics/OpenMP/metadirective-implementation.f90
blob: 7a7642158fc29faf35b63cdb15d6a1fea55ec79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52

! The IMPLEMENTATION trait set

subroutine f00
  !$omp metadirective &
!ERROR: Trait property should be a clause
  !$omp & when(implementation={atomic_default_mem_order(0)}: nothing)
end

subroutine f01
  !$omp metadirective &
!ERROR: ATOMIC_DEFAULT_MEM_ORDER trait requires a clause from the memory-order clause set
  !$omp & when(implementation={atomic_default_mem_order(nowait)}: nothing)
end

subroutine f02
  !$omp metadirective &
!ERROR: REQUIRES trait requires a clause from the requirement clause set
!ERROR: Invalid clause specification for SHARED
  !$omp & when(implementation={requires(shared)}: nothing)
end

subroutine f03
  !$omp metadirective &
!This is ok
  !$omp & when(implementation={ &
  !$omp &         atomic_default_mem_order(relaxed), &
  !$omp &         extension("foo"), &
  !$omp &         requires(unified_address),
  !$omp &         vendor(some_vendor) &
  !$omp &      }: nothing)
end