45 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 4.53! Check for cycle statements leaving an OpenMP structured block4 5program omp_do6 integer i, j, k7 8 !$omp parallel9 foo: do i = 0, 1010 !$omp do11 bar: do j = 0, 1012 !ERROR: CYCLE to construct 'foo' outside of DO construct is not allowed13 cycle foo14 end do bar15 !$omp end do16 end do foo17 !$omp end parallel18 19 foo1: do i = 0, 1020 !$omp parallel21 foo2: do k = 0, 1022 !$omp do23 foo3: do j = 0, 1024 !ERROR: CYCLE to construct 'foo1' outside of PARALLEL construct is not allowed25 !ERROR: CYCLE to construct 'foo1' outside of DO construct is not allowed26 cycle foo127 end do foo328 !$omp end do29 end do foo230 !$omp end parallel31 end do foo132 33 bar1: do i = 0, 1034 !$omp parallel35 bar2: do k = 0, 1036 bar3: do j = 0, 1037 !ERROR: CYCLE to construct 'bar1' outside of PARALLEL construct is not allowed38 cycle bar139 end do bar340 end do bar241 !$omp end parallel42 end do bar143 44end program omp_do45