File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
mlir/include/mlir/Dialect/OpenMP Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ ! This test checks lowering of OpenMP Flush Directive.
2+
3+ ! RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
4+
5+ module flush02_mod
6+ type t1
7+ integer (kind= 4 ) :: x = 4
8+ end type t1
9+
10+ type :: t2
11+ type (t1) :: y = t1(2 )
12+ end type t2
13+
14+
15+ contains
16+
17+ subroutine sub01 (pt )
18+ class(t1), intent (inout ) :: pt
19+ type (t2) :: dt
20+ 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 subroutine
32+ end module flush02_mod
Original file line number Diff line number Diff line change @@ -889,7 +889,7 @@ def FlushOp : OpenMP_Op<"flush", clauses = [
889889 specified or implied.
890890 }] # clausesDescription;
891891
892- let arguments = !con((ins Variadic<OpenMP_PointerLikeType >:$varList),
892+ let arguments = !con((ins Variadic<AnyType >:$varList),
893893 clausesArgs);
894894
895895 // Override inherited assembly format to include `varList`.
You can’t perform that action at this time.
0 commit comments