brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · e7825e5 Raw
101 lines · plain
1!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=52 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s2!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=52 %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine f005  !$omp target defaultmap(from)6  !$omp end target7end8 9!UNPARSE: SUBROUTINE f0010!UNPARSE: !$OMP TARGET  DEFAULTMAP(FROM)11!UNPARSE: !$OMP END TARGET12!UNPARSE: END SUBROUTINE13 14!PARSE-TREE: OmpBeginDirective15!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target16!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause17!PARSE-TREE: | | ImplicitBehavior = From18!PARSE-TREE: Block19 20subroutine f0121  !$omp target defaultmap(firstprivate: aggregate)22  !$omp end target23end24 25!UNPARSE: SUBROUTINE f0126!UNPARSE: !$OMP TARGET  DEFAULTMAP(FIRSTPRIVATE:AGGREGATE)27!UNPARSE: !$OMP END TARGET28!UNPARSE: END SUBROUTINE29 30!PARSE-TREE: OmpBeginDirective31!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target32!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause33!PARSE-TREE: | | ImplicitBehavior = Firstprivate34!PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = Aggregate35 36subroutine f0237  !$omp target defaultmap(alloc: all)38  !$omp end target39end40 41!UNPARSE: SUBROUTINE f0242!UNPARSE: !$OMP TARGET  DEFAULTMAP(ALLOC:ALL)43!UNPARSE: !$OMP END TARGET44!UNPARSE: END SUBROUTINE45 46!PARSE-TREE: OmpBeginDirective47!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target48!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause49!PARSE-TREE: | | ImplicitBehavior = Alloc50!PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = All51 52! Both "all" and "allocatable" are valid, and "all" is a prefix of53! "allocatable". Make sure we parse this correctly.54subroutine f0355  !$omp target defaultmap(alloc: allocatable)56  !$omp end target57end58 59!UNPARSE: SUBROUTINE f0360!UNPARSE: !$OMP TARGET  DEFAULTMAP(ALLOC:ALLOCATABLE)61!UNPARSE: !$OMP END TARGET62!UNPARSE: END SUBROUTINE63 64!PARSE-TREE: OmpBeginDirective65!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target66!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause67!PARSE-TREE: | | ImplicitBehavior = Alloc68!PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = Allocatable69 70subroutine f0471  !$omp target defaultmap(tofrom: scalar)72  !$omp end target73end74 75!UNPARSE: SUBROUTINE f0476!UNPARSE: !$OMP TARGET  DEFAULTMAP(TOFROM:SCALAR)77!UNPARSE: !$OMP END TARGET78!UNPARSE: END SUBROUTINE79 80!PARSE-TREE: OmpBeginDirective81!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target82!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause83!PARSE-TREE: | | ImplicitBehavior = Tofrom84!PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value  = Scalar85 86subroutine f0587  !$omp target defaultmap(present: scalar)88  !$omp end target89end90 91!UNPARSE: SUBROUTINE f0592!UNPARSE: !$OMP TARGET  DEFAULTMAP(PRESENT:SCALAR)93!UNPARSE: !$OMP END TARGET94!UNPARSE: END SUBROUTINE95 96!PARSE-TREE: OmpBeginDirective97!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = target98!PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause99!PARSE-TREE: | | ImplicitBehavior = Present100!PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value  = Scalar101