summaryrefslogtreecommitdiff
path: root/flang/test/Parser/OpenMP/declare-mapper-unparse.f90
blob: 9da6674c3a58d61e40c39ad09bb3305204c3154d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck --ignore-case %s
! RUN: %flang_fc1 -fdebug-dump-parse-tree-no-sema -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s
program main
!CHECK-LABEL: program main
  implicit none

  type ty
     integer :: x
  end type ty


!CHECK: !$OMP DECLARE MAPPER(mymapper:ty::mapped) MAP(mapped,mapped%x)
  !$omp declare mapper(mymapper : ty :: mapped) map(mapped, mapped%x)

!PARSE-TREE:      OpenMPDeclareMapperConstruct
!PARSE-TREE:        OmpMapperSpecifier
!PARSE-TREE:         string = 'mymapper'
!PARSE-TREE:         TypeSpec -> DerivedTypeSpec
!PARSE-TREE:           Name = 'ty'
!PARSE-TREE:         Name = 'mapped'
!PARSE-TREE:        OmpMapClause
!PARSE-TREE:          OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'mapped'
!PARSE-TREE:          OmpObject -> Designator -> DataRef -> StructureComponent
!PARSE-TREE:           DataRef -> Name = 'mapped'
!PARSE-TREE:           Name = 'x'

!CHECK: !$OMP DECLARE MAPPER(ty::mapped) MAP(mapped,mapped%x)
  !$omp declare mapper(ty :: mapped) map(mapped, mapped%x)

!PARSE-TREE:      OpenMPDeclareMapperConstruct
!PARSE-TREE:        OmpMapperSpecifier
!PARSE-TREE:         string = 'ty_omp_default_mapper'
!PARSE-TREE:         TypeSpec -> DerivedTypeSpec
!PARSE-TREE:           Name = 'ty'
!PARSE-TREE:         Name = 'mapped'
!PARSE-TREE:        OmpMapClause
!PARSE-TREE:          OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'mapped'
!PARSE-TREE:          OmpObject -> Designator -> DataRef -> StructureComponent
!PARSE-TREE:           DataRef -> Name = 'mapped'
!PARSE-TREE:           Name = 'x'

end program main
!CHECK-LABEL: end program main