Created attachment 57466 [details] OpenACC run-time testcase The problem with acc_attach is that it does not like any temporary variable. For call acc_attach(var%v) We need at the end: acc_attach(&var.v.data) But we will easily get: parm.v.data = var.v.data; ... acc_attach(&parm.v.data) which won't work => This requires a builtin in the GCC front end to handle this as no Fortran semantic will handle this. Note that: subroutine acc_attach (ptr_addr) bind(C) type(*), dimension(*), target, optional :: ptr_addr end subroutine comes close but gets 'acc_attach (var.v.data)' and not '&var.v.data' as argument.