Files
clang-p2996/flang/test/Parser/OpenMP/tile-size.f90
Krzysztof Parzyszek 00ab44ee66 [flang][OpenMP] Add version checks for clauses (#110015)
If there is a clause that is allowed on a given directive in a later
version of the OpenMP spec, report an error and provide the minimal spec
version that allows the clause.

The case where a clause is not allowed on a directive at all is already
handled elsewhere.
2024-09-26 08:56:41 -05:00

24 lines
682 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=51 %s | FileCheck --ignore-case %s
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=51 %s | FileCheck --check-prefix="PARSE-TREE" %s
subroutine openmp_tiles(x)
integer, intent(inout)::x
!CHECK: !$omp tile sizes
!$omp tile sizes(2)
!CHECK: do
do x = 1, 100
call F1()
!CHECK: end do
end do
!CHECK: !$omp end tile
!$omp end tile
!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
!PARSE-TREE: OmpBeginLoopDirective
!PARSE-TREE: OmpLoopDirective -> llvm::omp::Directive = tile
!PARSE-TREE: OmpClauseList -> OmpClause -> Sizes -> Scalar -> Integer -> Expr = '2_4'
END subroutine openmp_tiles