66 lines · plain
1! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | \2! RUN: FileCheck --ignore-case %s3 4! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=50 %s | \5! RUN: FileCheck --check-prefix="PARSE-TREE" %s6 7! Check for parsing of loop directive8 9subroutine test_loop10 integer :: i, j = 111 !PARSE-TREE: OmpBeginLoopDirective12 !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = loop13 !CHECK: !$omp loop14 !$omp loop15 do i=1,1016 j = j + 117 end do18 !$omp end loop19 20 !PARSE-TREE: OmpBeginLoopDirective21 !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = loop22 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Bind -> OmpBindClause -> Binding = Thread23 !CHECK: !$omp loop24 !$omp loop bind(thread)25 do i=1,1026 j = j + 127 end do28 !$omp end loop29end subroutine30 31subroutine test_target_loop32 integer :: i, j = 133 !PARSE-TREE: OmpBeginLoopDirective34 !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = target loop35 !CHECK: !$omp target loop36 !$omp target loop37 do i=1,1038 j = j + 139 end do40 !$omp end target loop41end subroutine42 43subroutine test_target_teams_loop44 integer :: i, j = 145 !PARSE-TREE: OmpBeginLoopDirective46 !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = target teams loop47 !CHECK: !$omp target teams loop48 !$omp target teams loop49 do i=1,1050 j = j + 151 end do52 !$omp end target teams loop53end subroutine54 55subroutine test_target_parallel_loop56 integer :: i, j = 157 !PARSE-TREE: OmpBeginLoopDirective58 !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = target parallel loop59 !CHECK: !$omp target parallel loop60 !$omp target parallel loop61 do i=1,1062 j = j + 163 end do64 !$omp end target parallel loop65end subroutine66