[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / map-clause.f90
blob65ecbd9456464a63266254fdf4edd56e6d337f5e
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52
2 ! Check OpenMP MAP clause validity. Section 5.8.3 OpenMP 5.2.
4 subroutine sb(arr)
5 implicit none
6 real(8) :: arr(*)
7 real :: a
8 integer:: b, c, i
9 common /var/ b, c
11 !ERROR: Assumed-size whole arrays may not appear on the MAP clause
12 !$omp target map(arr)
13 do i = 1, 100
14 a = 3.14
15 enddo
16 !$omp end target
18 !ERROR: Assumed-size array 'arr' must have explicit final subscript upper bound value
19 !$omp target map(arr(:))
20 do i = 1, 100
21 a = 3.14
22 enddo
23 !$omp end target
25 !$omp target map(arr(3:5))
26 do i = 1, 100
27 a = 3.14
28 enddo
29 !$omp end target
31 !$omp target map(tofrom: /var/)
32 b = 1
33 c = 2
34 !$omp end target
35 end subroutine
37 subroutine sb1
38 integer :: xx
39 integer :: a
40 !ERROR: Name 'xx' should be a mapper name
41 !$omp target map(mapper(xx), from:a)
42 !$omp end target
43 end subroutine sb1