114 lines · plain
1!RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp -fopenmp-version=60 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s2!RUN: %flang_fc1 -fdebug-dump-parse-tree-no-sema -fopenmp -fopenmp-version=60 %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine f00(x)5 integer :: x6 !$omp target map(always, close, delete, present, ompx_hold: x)7 x = x + 18 !$omp end target9end10 11!UNPARSE: SUBROUTINE f00 (x)12!UNPARSE: INTEGER x13!UNPARSE: !$OMP TARGET MAP(ALWAYS, CLOSE, DELETE, PRESENT, OMPX_HOLD: x)14!UNPARSE: x = x+115!UNPARSE: !$OMP END TARGET16!UNPARSE: END SUBROUTINE17 18!PARSE-TREE: OmpBeginDirective19!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target20!PARSE-TREE: | OmpClauseList -> OmpClause -> Map -> OmpMapClause21!PARSE-TREE: | | Modifier -> OmpAlwaysModifier -> Value = Always22!PARSE-TREE: | | Modifier -> OmpCloseModifier -> Value = Close23!PARSE-TREE: | | Modifier -> OmpDeleteModifier -> Value = Delete24!PARSE-TREE: | | Modifier -> OmpPresentModifier -> Value = Present25!PARSE-TREE: | | Modifier -> OmpxHoldModifier -> Value = Ompx_Hold26!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'27!PARSE-TREE: | | bool = 'true'28 29subroutine f01(x)30 integer :: x31 !$omp target map(self, storage: x)32 x = x + 133 !$omp end target34end35 36!UNPARSE: !$OMP TARGET MAP(SELF, STORAGE: x)37!UNPARSE: x = x+138!UNPARSE: !$OMP END TARGET39!UNPARSE: END SUBROUTINE40 41!PARSE-TREE: OmpBeginDirective42!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target43!PARSE-TREE: | OmpClauseList -> OmpClause -> Map -> OmpMapClause44!PARSE-TREE: | | Modifier -> OmpSelfModifier -> Value = Self45!PARSE-TREE: | | Modifier -> OmpMapType -> Value = Storage46!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'47!PARSE-TREE: | | bool = 'true'48 49subroutine f02(x)50 integer, pointer :: x51 !$omp target map(ref_ptr, to: x)52 x = x + 153 !$omp end target54end55 56!UNPARSE: SUBROUTINE f02 (x)57!UNPARSE: INTEGER, POINTER :: x58!UNPARSE: !$OMP TARGET MAP(REF_PTR, TO: x)59!UNPARSE: x = x+160!UNPARSE: !$OMP END TARGET61!UNPARSE: END SUBROUTINE62 63!PARSE-TREE: OmpBeginDirective64!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target65!PARSE-TREE: | OmpClauseList -> OmpClause -> Map -> OmpMapClause66!PARSE-TREE: | | Modifier -> OmpRefModifier -> Value = Ref_Ptr67!PARSE-TREE: | | Modifier -> OmpMapType -> Value = To68!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'69!PARSE-TREE: | | bool = 'true'70 71subroutine f03(x)72 integer, pointer :: x73 !$omp target map(ref_ptee, to: x)74 x = x + 175 !$omp end target76end77 78!UNPARSE: SUBROUTINE f03 (x)79!UNPARSE: INTEGER, POINTER :: x80!UNPARSE: !$OMP TARGET MAP(REF_PTEE, TO: x)81!UNPARSE: x = x+182!UNPARSE: !$OMP END TARGET83!UNPARSE: END SUBROUTINE84 85!PARSE-TREE: OmpBeginDirective86!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target87!PARSE-TREE: | OmpClauseList -> OmpClause -> Map -> OmpMapClause88!PARSE-TREE: | | Modifier -> OmpRefModifier -> Value = Ref_Ptee89!PARSE-TREE: | | Modifier -> OmpMapType -> Value = To90!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'91!PARSE-TREE: | | bool = 'true'92 93subroutine f04(x)94 integer, pointer :: x95 !$omp target map(ref_ptr_ptee, to: x)96 x = x + 197 !$omp end target98end99 100!UNPARSE: SUBROUTINE f04 (x)101!UNPARSE: INTEGER, POINTER :: x102!UNPARSE: !$OMP TARGET MAP(REF_PTR_PTEE, TO: x)103!UNPARSE: x = x+1104!UNPARSE: !$OMP END TARGET105!UNPARSE: END SUBROUTINE106 107!PARSE-TREE: OmpBeginDirective108!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target109!PARSE-TREE: | OmpClauseList -> OmpClause -> Map -> OmpMapClause110!PARSE-TREE: | | Modifier -> OmpRefModifier -> Value = Ref_Ptr_Ptee111!PARSE-TREE: | | Modifier -> OmpMapType -> Value = To112!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'113!PARSE-TREE: | | bool = 'true'114