Debian Codegraph @

flang/test/Semantics/OpenMP/requires02.f90

raw
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 5.0
3 ! 2.4 Requires directive
4 ! All atomic_default_mem_order clauses in 'requires' directives must come
5 ! strictly before any atomic directives on which the memory_order clause is not
6 ! specified.
7
8 subroutine f
9 integer :: a = 0
10 !$omp atomic
11 a = a + 1
12 end subroutine f
13
14 subroutine g
15 !ERROR: REQUIRES directive with 'ATOMIC_DEFAULT_MEM_ORDER' clause found lexically after atomic operation without a memory order clause
16 !$omp requires atomic_default_mem_order(relaxed)
17 end subroutine g