[LVI][CVP] Add test for trunc bittest. (NFC)
[llvm-project.git] / flang / test / Parser / OpenMP / defaultmap-clause.f90
blobdc036aedcd003ec1a2673e0085e7b4958bf020dd
1 !RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=52 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
2 !RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=52 %s | FileCheck --check-prefix="PARSE-TREE" %s
4 subroutine f00
5 !$omp target defaultmap(from)
6 !$omp end target
7 end
9 !UNPARSE: SUBROUTINE f00
10 !UNPARSE: !$OMP TARGET DEFAULTMAP(FROM)
11 !UNPARSE: !$OMP END TARGET
12 !UNPARSE: END SUBROUTINE
14 !PARSE-TREE: OmpBeginBlockDirective
15 !PARSE-TREE: | OmpBlockDirective -> llvm::omp::Directive = target
16 !PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
17 !PARSE-TREE: | | ImplicitBehavior = From
18 !PARSE-TREE: Block
20 subroutine f01
21 !$omp target defaultmap(firstprivate: aggregate)
22 !$omp end target
23 end
25 !UNPARSE: SUBROUTINE f01
26 !UNPARSE: !$OMP TARGET DEFAULTMAP(FIRSTPRIVATE:AGGREGATE)
27 !UNPARSE: !$OMP END TARGET
28 !UNPARSE: END SUBROUTINE
30 !PARSE-TREE: OmpBeginBlockDirective
31 !PARSE-TREE: | OmpBlockDirective -> llvm::omp::Directive = target
32 !PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
33 !PARSE-TREE: | | ImplicitBehavior = Firstprivate
34 !PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = Aggregate
36 subroutine f02
37 !$omp target defaultmap(alloc: all)
38 !$omp end target
39 end
41 !UNPARSE: SUBROUTINE f02
42 !UNPARSE: !$OMP TARGET DEFAULTMAP(ALLOC:ALL)
43 !UNPARSE: !$OMP END TARGET
44 !UNPARSE: END SUBROUTINE
46 !PARSE-TREE: OmpBeginBlockDirective
47 !PARSE-TREE: | OmpBlockDirective -> llvm::omp::Directive = target
48 !PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
49 !PARSE-TREE: | | ImplicitBehavior = Alloc
50 !PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = All
52 ! Both "all" and "allocatable" are valid, and "all" is a prefix of
53 ! "allocatable". Make sure we parse this correctly.
54 subroutine f03
55 !$omp target defaultmap(alloc: allocatable)
56 !$omp end target
57 end
59 !UNPARSE: SUBROUTINE f03
60 !UNPARSE: !$OMP TARGET DEFAULTMAP(ALLOC:ALLOCATABLE)
61 !UNPARSE: !$OMP END TARGET
62 !UNPARSE: END SUBROUTINE
64 !PARSE-TREE: OmpBeginBlockDirective
65 !PARSE-TREE: | OmpBlockDirective -> llvm::omp::Directive = target
66 !PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
67 !PARSE-TREE: | | ImplicitBehavior = Alloc
68 !PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = Allocatable
70 subroutine f04
71 !$omp target defaultmap(tofrom: scalar)
72 !$omp end target
73 end
75 !UNPARSE: SUBROUTINE f04
76 !UNPARSE: !$OMP TARGET DEFAULTMAP(TOFROM:SCALAR)
77 !UNPARSE: !$OMP END TARGET
78 !UNPARSE: END SUBROUTINE
80 !PARSE-TREE: OmpBeginBlockDirective
81 !PARSE-TREE: | OmpBlockDirective -> llvm::omp::Directive = target
82 !PARSE-TREE: | OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
83 !PARSE-TREE: | | ImplicitBehavior = Tofrom
84 !PARSE-TREE: | | Modifier -> OmpVariableCategory -> Value = Scalar