summaryrefslogtreecommitdiff
path: root/offload/test/offloading/fortran/dtype-char-array-map-2.f90
blob: f17ea9e53853b83c829ae6c65bbeaf9c462b83aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! Offloading test that verifies certain type of character string arrays
! map to and from device without problem.
! REQUIRES: flang, amdgpu

! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
  implicit none
  type char_t
    CHARACTER(LEN=16), dimension(10,10) :: char_arr
  end type char_t
  type(char_t) :: dtype_char

!$omp target enter data map(alloc:dtype_char%char_arr)

!$omp target
    dtype_char%char_arr(2,2) = 'c'
!$omp end target

!$omp target update from(dtype_char%char_arr)


 print *, dtype_char%char_arr(2,2)
end program

!CHECK: c