brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 9ca0e8c Raw
67 lines · plain
1! Testing the Semantics of clauses on loop transformation directives2 3!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=604 5 6subroutine loop_transformation_construct17  implicit none8  integer, parameter:: i = 59  integer :: x10  integer :: a11  integer :: v(i)12 13  !ERROR: At most one LOOPRANGE clause can appear on the FUSE directive14  !$omp fuse looprange(1,2) looprange(1,2)15  do x = 1, i16    v(x) = x * 217  end do18  do x = 1, i19    v(x) = x * 220  end do21  !$omp end fuse22 23  !ERROR: The loop range indicated in the LOOPRANGE(5,2) clause must not be out of the bounds of the Loop Sequence following the construct.24  !$omp fuse looprange(5,2)25  do x = 1, i26    v(x) = x * 227  end do28  do x = 1, i29    v(x) = x * 230  end do31  !$omp end fuse32 33  !ERROR: The parameter of the LOOPRANGE clause must be a constant positive integer expression34  !$omp fuse looprange(0,1)35  do x = 1, i36    v(x) = x * 237  end do38  do x = 1, i39    v(x) = x * 240  end do41  !$omp end fuse42 43  !ERROR: The parameter of the LOOPRANGE clause must be a constant positive integer expression44  !$omp fuse looprange(1,-1)45  do x = 1, i46    v(x) = x * 247  end do48  do x = 1, i49    v(x) = x * 250  end do51  !$omp end fuse52 53  !ERROR: Must be a constant value54  !$omp fuse looprange(a,2)55  do x = 1, i56    v(x) = x * 257  end do58  !$omp end fuse59 60  !ERROR: Must be a constant value61  !$omp fuse looprange(1,a)62  do x = 1, i63    v(x) = x * 264  end do65  !$omp end fuse66end subroutine67