brintos

brintos / llvm-project-archived public Read only

0
0
Text · 929 B · b372e70 Raw
33 lines · plain
1! This test checks lowering of OpenMP Flush Directive.2 3!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s4 5module flush02_mod6    type t17       integer(kind=4) :: x = 48    end type t19 10    type :: t211       type(t1) :: y = t1(2)12    end type t213 14 15contains16 17    subroutine sub01(pt)18        class(t1), intent(inout) :: pt19        type(t2)                 :: dt20        integer, allocatable     :: a(:)21        integer, pointer         :: b(:)22 23        ! CHECK: omp.flush({{.*}} : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>)24        ! CHECK: omp.flush({{.*}} : !fir.ref<f32>)25        ! CHECK: omp.flush({{.*}} : !fir.ref<!fir.type<_QMflush02_modTt2{y:!fir.type<_QMflush02_modTt1{x:i32}>}>>)26        ! CHECK: omp.flush({{.*}} : !fir.class<!fir.type<_QMflush02_modTt1{x:i32}>>)27        !$omp flush(a)28        !$omp flush(p)29        !$omp flush(dt)30        !$omp flush(pt)31    end subroutine32end module flush02_mod33