[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / map-modifiers.f90
blobaae918a2f1f943bfd4ed004b986302601cf6dc08
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52 -Werror
3 subroutine f10(x)
4 integer :: x
5 !PORTABILITY: The specification of modifiers without comma separators for the 'MAP' clause has been deprecated in OpenMP 5.2
6 !$omp target map(always, present close, to: x)
7 x = x + 1
8 !$omp end target
9 end
11 subroutine f11(x)
12 integer :: x
13 !PORTABILITY: The specification of modifiers without comma separators for the 'MAP' clause has been deprecated in OpenMP 5.2
14 !$omp target map(always, present, close to: x)
15 x = x + 1
16 !$omp end target
17 end
19 subroutine f12(x)
20 integer :: x
21 !WARNING: Duplicate map-type-modifier entry 'PRESENT' will be ignored
22 !$omp target map(always, present, close, present, to: x)
23 x = x + 1
24 !$omp end target
25 end
27 subroutine f13(x)
28 integer :: x(10)
29 !ERROR: The iterator variable must be of integer type
30 !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 + 1
33 !$omp end target
34 end
36 subroutine f14(x)
37 integer :: x(10)
38 !ERROR: The begin and end expressions in iterator range-specification are mandatory
39 !$omp target map(present, iterator(integer :: i = :10:1), to: x(i))
40 x = x + 1
41 !$omp end target
42 end
44 subroutine f15(x)
45 integer :: x(10)
46 !ERROR: The begin and end expressions in iterator range-specification are mandatory
47 !$omp target map(present, iterator(integer :: i = 1:), to: x(i))
48 x = x + 1
49 !$omp end target
50 end
52 subroutine f16(x)
53 integer :: x(10)
54 !ERROR: The begin and end expressions in iterator range-specification are mandatory
55 !$omp target map(present, iterator(integer :: i = 1::-1), to: x(i))
56 x = x + 1
57 !$omp end target
58 end
60 subroutine f17(x)
61 integer :: x(10)
62 !WARNING: The step value in the iterator range is 0
63 !$omp target map(present, iterator(integer :: i = 1:2:0), to: x(i))
64 x = x + 1
65 !$omp end target
66 end
68 subroutine f18(x)
69 integer :: x(10)
70 !WARNING: The begin value is less than the end value in iterator range-specification with a negative step
71 !$omp target map(present, iterator(integer :: i = 1:10:-2), to: x(i))
72 x = x + 1
73 !$omp end target
74 end
76 subroutine f19(x)
77 integer :: x(10)
78 !WARNING: The begin value is greater than the end value in iterator range-specification with a positive step
79 !$omp target map(present, iterator(integer :: i = 12:1:2), to: x(i))
80 x = x + 1
81 !$omp end target
82 end
84 subroutine f1a(x)
85 integer :: x(10)
86 !ERROR: 'iterator' modifier cannot occur multiple times
87 !$omp target map(present, iterator(i = 1:2), iterator(j = 1:2), to: x(i + j))
88 x = x + 1
89 !$omp end target
90 end
92 subroutine f23(x)
93 integer :: x(10)
94 !ERROR: 'map-type' should be the last modifier
95 !$omp target map(present, from, iterator(i = 1:10): x(i))
96 x = x + 1
97 !$omp end target
98 end