public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/114002] New: [OpenACC][OpenACC 3.3] Add 'acc_attach'/'acc_detach' routine
@ 2024-02-19 20:26 burnus at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2024-02-19 20:26 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-19 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 20:26 [Bug fortran/114002] New: [OpenACC][OpenACC 3.3] Add 'acc_attach'/'acc_detach' routine burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).