xref: /llvm-project/flang/test/Semantics/OpenMP/requires09.f90 (revision 502bea25bdc07d1811b8bfea1c2e6bfa8617f72f)
1*edc2fb07SSergio Afonso! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2*edc2fb07SSergio Afonso! OpenMP Version 5.0
3*edc2fb07SSergio Afonso! 2.4 Requires directive
4*edc2fb07SSergio Afonso! All atomic_default_mem_order clauses in 'requires' directives found within a
5*edc2fb07SSergio Afonso! compilation unit must specify the same ordering.
6*edc2fb07SSergio Afonso
7*edc2fb07SSergio Afonsosubroutine f
8*edc2fb07SSergio Afonso  !$omp requires atomic_default_mem_order(seq_cst)
9*edc2fb07SSergio Afonsoend subroutine f
10*edc2fb07SSergio Afonso
11*edc2fb07SSergio Afonso!ERROR: Conflicting 'ATOMIC_DEFAULT_MEM_ORDER' REQUIRES clauses found in compilation unit
12*edc2fb07SSergio Afonsosubroutine g
13*edc2fb07SSergio Afonso  !$omp requires atomic_default_mem_order(relaxed)
14*edc2fb07SSergio Afonsoend subroutine g
15