brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.0 KiB · 54b3e66 Raw
200 lines · plain
1! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s2! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine openmp_sections(x, y)5 6  integer, intent(inout)::x, y7 8!==============================================================================9! empty construct10!==============================================================================11!CHECK: !$omp sections12!$omp sections13!CHECK: !$omp end sections14!$omp end sections15 16!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct17!PARSE-TREE: | OmpBeginSectionsDirective18!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections19!PARSE-TREE: | | OmpClauseList ->20!PARSE-TREE: | | Flags = {}21!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct22!PARSE-TREE: | | Block23!PARSE-TREE: | OmpEndSectionsDirective24!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections25!PARSE-TREE: | | OmpClauseList ->26!PARSE-TREE: | | Flags = {}27 28!==============================================================================29! single section, without `!$omp section`30!==============================================================================31!CHECK: !$omp sections32!$omp sections33    !CHECK: CALL34    call F1()35!CHECK: !$omp end sections36!$omp end sections37 38!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct39!PARSE-TREE: | OmpBeginSectionsDirective40!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections41!PARSE-TREE: | | OmpClauseList ->42!PARSE-TREE: | | Flags = {}43!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct44!PARSE-TREE: | | Block45!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'46!PARSE-TREE: | | | | Call47!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'48!PARSE-TREE: | OmpEndSectionsDirective49!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections50!PARSE-TREE: | | OmpClauseList ->51!PARSE-TREE: | | Flags = {}52 53!==============================================================================54! single section with `!$omp section`55!==============================================================================56!CHECK: !$omp sections57!$omp sections58  !CHECK: !$omp section59  !$omp section60    !CHECK: CALL F161    call F162!CHECK: !$omp end sections63!$omp end sections64 65!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct66!PARSE-TREE: | OmpBeginSectionsDirective67!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections68!PARSE-TREE: | | OmpClauseList ->69!PARSE-TREE: | | Flags = {}70!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct71!PARSE-TREE: | | OmpDirectiveSpecification72!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section73!PARSE-TREE: | | | OmpClauseList ->74!PARSE-TREE: | | | Flags = {}75!PARSE-TREE: | | Block76!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'77!PARSE-TREE: | | | | Call78!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'79!PARSE-TREE: | OmpEndSectionsDirective80!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections81!PARSE-TREE: | | OmpClauseList ->82!PARSE-TREE: | | Flags = {}83 84!==============================================================================85! multiple sections86!==============================================================================87!CHECK: !$omp sections88!$omp sections89  !CHECK: !$omp section90  !$omp section91    !CHECK: CALL F192    call F193  !CHECK: !$omp section94  !$omp section95    !CHECK: CALL F296    call F297  !CHECK: !$omp section98  !$omp section99    !CHECK: CALL F3100    call F3101!CHECK: !$omp end sections102!$omp end sections103 104!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct105!PARSE-TREE: | OmpBeginSectionsDirective106!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections107!PARSE-TREE: | | OmpClauseList ->108!PARSE-TREE: | | Flags = {}109!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct110!PARSE-TREE: | | OmpDirectiveSpecification111!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section112!PARSE-TREE: | | | OmpClauseList ->113!PARSE-TREE: | | | Flags = {}114!PARSE-TREE: | | Block115!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'116!PARSE-TREE: | | | | Call117!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'118!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct119!PARSE-TREE: | | OmpDirectiveSpecification120!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section121!PARSE-TREE: | | | OmpClauseList ->122!PARSE-TREE: | | | Flags = {}123!PARSE-TREE: | | Block124!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f2()'125!PARSE-TREE: | | | | Call126!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f2'127!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct128!PARSE-TREE: | | OmpDirectiveSpecification129!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section130!PARSE-TREE: | | | OmpClauseList ->131!PARSE-TREE: | | | Flags = {}132!PARSE-TREE: | | Block133!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f3()'134!PARSE-TREE: | | | | Call135!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f3'136!PARSE-TREE: | OmpEndSectionsDirective137!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections138!PARSE-TREE: | | OmpClauseList ->139!PARSE-TREE: | | Flags = {}140 141!==============================================================================142! multiple sections with clauses143!==============================================================================144!CHECK: !$omp sections PRIVATE(x) FIRSTPRIVATE(y)145!$omp sections PRIVATE(x) FIRSTPRIVATE(y)146  !CHECK: !$omp section147  !$omp section148    !CHECK: CALL F1149    call F1150  !CHECK: !$omp section151  !$omp section152    !CHECK: CALL F2153    call F2154  !CHECK: !$omp section155  !$omp section156    !CHECK: CALL F3157    call F3158!CHECK: !$omp end sections NOWAIT159!$omp end sections NOWAIT160 161!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct162!PARSE-TREE: | OmpBeginSectionsDirective163!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections164!PARSE-TREE: | | OmpClauseList -> OmpClause -> Private -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'165!PARSE-TREE: | | OmpClause -> Firstprivate -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'y'166!PARSE-TREE: | | Flags = {}167!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct168!PARSE-TREE: | | OmpDirectiveSpecification169!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section170!PARSE-TREE: | | | OmpClauseList ->171!PARSE-TREE: | | | Flags = {}172!PARSE-TREE: | | Block173!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'174!PARSE-TREE: | | | | Call175!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'176!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct177!PARSE-TREE: | | OmpDirectiveSpecification178!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section179!PARSE-TREE: | | | OmpClauseList ->180!PARSE-TREE: | | | Flags = {}181!PARSE-TREE: | | Block182!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f2()'183!PARSE-TREE: | | | | Call184!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f2'185!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct186!PARSE-TREE: | | OmpDirectiveSpecification187!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section188!PARSE-TREE: | | | OmpClauseList ->189!PARSE-TREE: | | | Flags = {}190!PARSE-TREE: | | Block191!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f3()'192!PARSE-TREE: | | | | Call193!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f3'194!PARSE-TREE: | OmpEndSectionsDirective195!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections196!PARSE-TREE: | | OmpClauseList -> OmpClause -> Nowait197!PARSE-TREE: | | Flags = {}198 199END subroutine openmp_sections200