brintos

brintos / llvm-project-archived public Read only

0
0
Text · 843 B · f02a748 Raw
30 lines · plain
1! This test checks lowering of OpenMP Threadprivate Directive.2! Test for common block, defined in one module, used in a subroutine of3! another module and privatized in a nested subroutine.4 5!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s6 7!CHECK: fir.global common @cmn_(dense<0> : vector<4xi8>) {alignment = 4 : i64} : !fir.array<4xi8>8module m09  common /cmn/ k110  !$omp threadprivate(/cmn/)11end12 13module  m114contains15  subroutine ss116    use m017  contains18!CHECK-LABEL: func private @_QMm1Fss1Pss219!CHECK: %[[CMN:.*]] = fir.address_of(@cmn_) : !fir.ref<!fir.array<4xi8>>20!CHECK: omp.parallel21!CHECK: %{{.*}} = omp.threadprivate %[[CMN]] : !fir.ref<!fir.array<4xi8>> -> !fir.ref<!fir.array<4xi8>>22    subroutine ss223      !$omp parallel copyin (k1)24      !$omp end parallel25    end subroutine ss226  end subroutine ss127end28 29end30