subroutine foo type t integer :: i, j end type t type t2 type(t) :: cc(3) end type t2 type(t) x, y(3) type(t2) :: z(3) ! OK - map whole aggregated variable !$acc enter data copyin(x) ! map(to:x [len: 8]) ! OK - map two components of the aggregated variable !$acc enter data copyin(x%j, x%i) ! map(struct:x [len: 2]) map(to:x.i [len: 4]) map(to:x.j [len: 4]) ! WRONG? Accepted – but should it? ! Maps whole 'x' plus 'x%j' again. ! In gcc/g++ rejected for OpenMP and, hence, for OpenACC. ! - only "x.i, x.j" or "x" is accepted by OpenMP. ! gfortran: not yet implemented OpenMP 4.5 feature. !$acc enter data copyin(x, x%i) ! map(to:x [len: 8]) map(to:x.i [len: 4]) ! I think this only works by chance. ! WRONG? Strided access of 'x' ! No C/C++ equivalent !$acc enter data copyin(y(:)%i) ! In terms of Fortran semantic this is equivalent to ! copyin(y(1)%i, y(2)%i, y(3)%i). ! Dump shows: ! map(to:MEM[(c_char *)_6] [len: _5]) ! which is map(to:y [len: 3*sizeof(t)]), ! i.e. equivalent to "copyin(y)". ! I am not sure what the expected input is !$acc enter data copyin(z(1)%cc(:)%i) ! ICE in gfc_trans_omp_array_section end