https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114002

            Bug ID: 114002
           Summary: [OpenACC][OpenACC 3.3] Add 'acc_attach'/'acc_detach'
                    routine
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57466
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57466&action=edit
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.

Reply via email to