1 ! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s
2 ! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s
4 ! Check for parsing scan directive
5 subroutine test_scan(n
, a
, b
)
11 ! a(k) is included in the computation of producing results in b(k)
12 !$omp parallel do simd reduction(inscan,+: x)
15 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
16 !PARSE-TREE-NEXT: OmpSimpleStandaloneDirective -> llvm::omp::Directive = scan
17 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Inclusive -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
18 !CHECK: !$omp scan inclusive(x)
19 !$omp scan inclusive(x)
23 ! a(k) is not included in the computation of producing results in b(k)
24 !$omp parallel do simd reduction(inscan,+: x)
27 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
28 !PARSE-TREE-NEXT: OmpSimpleStandaloneDirective -> llvm::omp::Directive = scan
29 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Exclusive -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
30 !CHECK: !$omp scan exclusive(x)
31 !$omp scan exclusive(x)
35 !$omp parallel do simd reduction(inscan,+: x, y)
38 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
39 !PARSE-TREE-NEXT: OmpSimpleStandaloneDirective -> llvm::omp::Directive = scan
40 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Inclusive -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
41 !PARSE-TREE-NEXT: OmpObject -> Designator -> DataRef -> Name = 'y'
42 !CHECK: !$omp scan inclusive(x,y)
43 !$omp scan inclusive(x, y)
47 !$omp parallel do simd reduction(inscan,+: x, y)
50 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
51 !PARSE-TREE-NEXT: OmpSimpleStandaloneDirective -> llvm::omp::Directive = scan
52 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Exclusive -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
53 !PARSE-TREE-NEXT: OmpObject -> Designator -> DataRef -> Name = 'y'
54 !CHECK: !$omp scan exclusive(x,y)
55 !$omp scan exclusive(x, y)