brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · aae918a Raw
99 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52 -Werror2 3subroutine f10(x)4  integer :: x5!PORTABILITY: The specification of modifiers without comma separators for the 'MAP' clause has been deprecated in OpenMP 5.26  !$omp target map(always, present close, to: x)7  x = x + 18  !$omp end target9end10 11subroutine f11(x)12  integer :: x13!PORTABILITY: The specification of modifiers without comma separators for the 'MAP' clause has been deprecated in OpenMP 5.214  !$omp target map(always, present, close to: x)15  x = x + 116  !$omp end target17end18 19subroutine f12(x)20  integer :: x21!WARNING: Duplicate map-type-modifier entry 'PRESENT' will be ignored22  !$omp target map(always, present, close, present, to: x)23  x = x + 124  !$omp end target25end26 27subroutine f13(x)28  integer :: x(10)29!ERROR: The iterator variable must be of integer type30!ERROR: Must have INTEGER type, but is REAL(4)31  !$omp target map(present, iterator(real :: i = 1:10), to: x(i))32  x = x + 133  !$omp end target34end35 36subroutine f14(x)37  integer :: x(10)38!ERROR: The begin and end expressions in iterator range-specification are mandatory39  !$omp target map(present, iterator(integer :: i = :10:1), to: x(i))40  x = x + 141  !$omp end target42end43 44subroutine f15(x)45  integer :: x(10)46!ERROR: The begin and end expressions in iterator range-specification are mandatory47  !$omp target map(present, iterator(integer :: i = 1:), to: x(i))48  x = x + 149  !$omp end target50end51 52subroutine f16(x)53  integer :: x(10)54!ERROR: The begin and end expressions in iterator range-specification are mandatory55  !$omp target map(present, iterator(integer :: i = 1::-1), to: x(i))56  x = x + 157  !$omp end target58end59 60subroutine f17(x)61  integer :: x(10)62!WARNING: The step value in the iterator range is 063  !$omp target map(present, iterator(integer :: i = 1:2:0), to: x(i))64  x = x + 165  !$omp end target66end67 68subroutine f18(x)69  integer :: x(10)70!WARNING: The begin value is less than the end value in iterator range-specification with a negative step71  !$omp target map(present, iterator(integer :: i = 1:10:-2), to: x(i))72  x = x + 173  !$omp end target74end75 76subroutine f19(x)77  integer :: x(10)78!WARNING: The begin value is greater than the end value in iterator range-specification with a positive step79  !$omp target map(present, iterator(integer :: i = 12:1:2), to: x(i))80  x = x + 181  !$omp end target82end83 84subroutine f1a(x)85  integer :: x(10)86!ERROR: 'iterator' modifier cannot occur multiple times87  !$omp target map(present, iterator(i = 1:2), iterator(j = 1:2), to: x(i + j))88  x = x + 189  !$omp end target90end91 92subroutine f23(x)93  integer :: x(10)94!ERROR: 'map-type' should be the last modifier95  !$omp target map(present, from, iterator(i = 1:10): x(i))96  x = x + 197  !$omp end target98end99