public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/114002] New: [OpenACC][OpenACC 3.3] Add 'acc_attach'/'acc_detach' routine
Date: Mon, 19 Feb 2024 20:26:50 +0000	[thread overview]
Message-ID: <bug-114002-4@http.gcc.gnu.org/bugzilla/> (raw)

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	other threads:[~2024-02-19 20:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114002-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).