xref: /llvm-project/flang/test/Lower/OpenMP/requires-force-usm.f90 (revision b9549261e218cee2ad1305fb7272b831799b7bfe)
1! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-force-usm %s -o - | FileCheck %s
2! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-target-device -fopenmp-force-usm %s -o - | FileCheck %s
3! RUN: bbc -fopenmp -fopenmp-force-usm -emit-hlfir %s -o - | FileCheck %s
4! RUN: bbc -fopenmp -fopenmp-is-target-device -fopenmp-force-usm -emit-hlfir %s -o - | FileCheck %s
5
6! This test checks the addition of requires unified_shared_memory when
7! -fopenmp-force-usm is set, even when other requires directives are present
8
9!CHECK:      module attributes {
10!CHECK-SAME: omp.requires = #omp<clause_requires reverse_offload|unified_shared_memory>
11program requires
12  !$omp requires reverse_offload
13  !$omp target
14  !$omp end target
15end program requires
16