Files
Tarun Prabhu e5f93db6c0 [flang][NFC] Strip trailing whitespace from tests (14 of 14)
Only some fortran source files in flang/test/Semantics/OpenMP have been
modified. This is the last of the commits cleaning up trailing
whitespace in the Fortran files in flang/tests.
2025-12-17 10:24:32 -07:00

39 lines
1.0 KiB
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=50
! OpenMP Version 5.0
! Check OpenMP construct validity for the following directives:
! 11.7 Loop directive
program main
integer :: i, x
!$omp teams
!ERROR: `BIND(TEAMS)` must be specified since the `LOOP` region is strictly nested inside a `TEAMS` region.
!$omp loop bind(thread)
do i = 1, 10
x = x + 1
end do
!$omp end loop
!$omp end teams
!ERROR: `BIND(TEAMS)` must be specified since the `LOOP` directive is combined with a `TEAMS` construct.
!$omp target teams loop bind(thread)
do i = 1, 10
x = x + 1
end do
!$omp end target teams loop
!ERROR: `BIND(TEAMS)` must be specified since the `LOOP` directive is combined with a `TEAMS` construct.
!$omp teams loop bind(thread)
do i = 1, 10
x = x + 1
end do
!$omp end teams loop
!ERROR: 'REDUCTION' clause not allowed with '!$OMP LOOP BIND(TEAMS)'.
!$omp loop bind(teams) reduction(+: x)
do i = 0, 10
x = x + i
end do
end program main