public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96080] New: [OpenACC] 'acc_is_present' for Fortran 'pointer'
@ 2020-07-06 15:13 tschwinge at gcc dot gnu.org
  2020-07-09 19:30 ` [Bug fortran/96080] OpenACC/Fortran runtime library routines vs. " tschwinge at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-07-06 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96080
           Summary: [OpenACC] 'acc_is_present' for Fortran 'pointer'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org
  Target Milestone: ---

Do we have to clarify what 'acc_is_present' on a pointer means: whether the
data it points to is present, or whether the pointer object itself is present
-- or invalid?

    program main
      use openacc
      implicit none
      integer, dimension (:), allocatable, target :: a
      integer, dimension (:), pointer :: p

      allocate (a(10))
      !$acc enter data create(a)
      if (.not. acc_is_present (a)) stop 1

      p => a
      ! At this point, the data it points to is present, but the 'p' object
itself isn't.
      if (acc_is_present (p)) stop 2

      !$acc enter data create(p)
      ! At this point, both the data it points to, and the 'p' object are
present.
      if (.not. acc_is_present (p)) stop 3 !TODO This fails -- unexpectedly?

    end program main

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-01 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 15:13 [Bug fortran/96080] New: [OpenACC] 'acc_is_present' for Fortran 'pointer' tschwinge at gcc dot gnu.org
2020-07-09 19:30 ` [Bug fortran/96080] OpenACC/Fortran runtime library routines vs. " tschwinge at gcc dot gnu.org
2020-07-09 20:00 ` tschwinge at gcc dot gnu.org
2021-07-01 10:15 ` tschwinge 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).