xref: /llvm-project/flang/test/Lower/OpenMP/requires-common.f90 (revision 09b30f409069d296dad467433c60e7c8d431626b)
1*09b30f40SKiran Chandramohan! RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
2*09b30f40SKiran Chandramohan! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-target-device %s -o - | FileCheck %s
3*09b30f40SKiran Chandramohan! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
4*09b30f40SKiran Chandramohan! RUN: bbc -fopenmp -fopenmp-is-target-device -emit-hlfir %s -o - | FileCheck %s
5*09b30f40SKiran Chandramohan
6*09b30f40SKiran Chandramohan! This test checks the lowering of requires into MLIR
7*09b30f40SKiran Chandramohan
8*09b30f40SKiran Chandramohan!CHECK:      module attributes {
9*09b30f40SKiran Chandramohan!CHECK-SAME: omp.requires = #omp<clause_requires unified_shared_memory>
10*09b30f40SKiran Chandramohanblock data init
11*09b30f40SKiran Chandramohan  !$omp requires unified_shared_memory
12*09b30f40SKiran Chandramohan  integer :: x
13*09b30f40SKiran Chandramohan  common /block/ x
14*09b30f40SKiran Chandramohan  data x / 10 /
15*09b30f40SKiran Chandramohanend
16*09b30f40SKiran Chandramohan
17*09b30f40SKiran Chandramohansubroutine f
18*09b30f40SKiran Chandramohan  !$omp declare target
19*09b30f40SKiran Chandramohanend subroutine f
20