llvm-project/flang/test/Lower/OpenMP/requires-admo-invalid1.f90
Krzysztof Parzyszek 936c5566db
[flang][OpenMP] Handle REQUIRES ADMO in lowering (#144362)
The previous approach rewrote the atomic constructs in the AST based on
the REQUIRES ATOMIC_DEFAULT_MEM_ORDER directives. The new approach
checks for incorrect uses of REQUIRED ADMO in the semantic analysis, and
applies it in lowering, eliminating the need for a separate
tree-rewriting procedure.
2025-06-19 07:18:21 -05:00

17 lines
301 B
Fortran

!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 %s -o - | FileCheck %s
module m
!$omp requires atomic_default_mem_order(acquire)
contains
subroutine f00(x, v)
integer :: x, v
!CHECK: omp.atomic.write %{{[ %#=0-9]+}} memory_order(relaxed)
!$omp atomic write
x = v
end
end module