39 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=502 3! OpenMP Version 5.04! Check OpenMP construct validity for the following directives:5! 11.7 Loop directive6 7program main8 integer :: i, x9 10 !$omp teams 11 !ERROR: `BIND(TEAMS)` must be specified since the `LOOP` region is strictly nested inside a `TEAMS` region.12 !$omp loop bind(thread)13 do i = 1, 1014 x = x + 115 end do16 !$omp end loop17 !$omp end teams18 19 !ERROR: `BIND(TEAMS)` must be specified since the `LOOP` directive is combined with a `TEAMS` construct.20 !$omp target teams loop bind(thread)21 do i = 1, 1022 x = x + 123 end do24 !$omp end target teams loop25 26 !ERROR: `BIND(TEAMS)` must be specified since the `LOOP` directive is combined with a `TEAMS` construct.27 !$omp teams loop bind(thread)28 do i = 1, 1029 x = x + 130 end do31 !$omp end teams loop32 33 !ERROR: 'REDUCTION' clause not allowed with '!$OMP LOOP BIND(TEAMS)'.34 !$omp loop bind(teams) reduction(+: x)35 do i = 0, 1036 x = x + i37 end do38end program main39