brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 45c591e Raw
95 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2! OpenMP Version 4.53! 2.7.1 Loop Construct4 5program omp6  integer i, j, k7 8  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.9  !$omp do  collapse(3)10  do i = 0, 1011    if (i .lt. 1) then12      !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct13      cycle14    end if15    do j = 0, 1016      do k  = 0, 1017        print *, i, j, k18      end do19    end do20  end do21  !$omp end do22 23  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.24  !$omp do  collapse(3)25  do i = 0, 1026    do j = 0, 1027      if (i .lt. 1) then28        !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct29        cycle30      end if31      do k  = 0, 1032        print *, i, j, k33      end do34    end do35  end do36  !$omp end do37 38  !!ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.39  !$omp do  collapse(2)40  foo: do i = 0, 1041    foo1: do j = 0, 1042      if (i .lt. 1) then43        !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct44        cycle foo45      else if (i .gt. 3) then46        cycle foo147      end if48      do k  = 0, 1049        print *, i, j, k50      end do51    end do foo152  end do foo53  !$omp end do54 55 56  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.57  !$omp do  collapse(3)58  foo: do i = 0, 1059    foo1: do j = 0, 1060      if (i .lt. 1) then61        !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct62        cycle foo63      else if (i .gt. 3) then64        !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct65        cycle foo166      end if67         foo2:  do k  = 0, 1068             print *, i, j, k69           end do foo270         end do foo171  end do foo72  !$omp end do73 74  !$omp do  ordered(3)75  foo: do i = 0, 1076    foo1: do j = 0, 1077         foo2:  do k  = 0, 1078           if (i .lt. 1) then79             !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct80             cycle foo81           else if (i .gt. 3) then82             !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct83             cycle foo184          else85             !ERROR: CYCLE statement to non-innermost associated loop of an OpenMP DO construct86             cycle foo87          end if88             print *, i, j, k89           end do foo290         end do foo191  end do foo92  !$omp end do93 94end program omp95