public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
	fortran <fortran@gcc.gnu.org>, Jakub Jelinek <jakub@redhat.com>
Subject: Re: [Patch] Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]
Date: Fri, 30 Sep 2022 12:57:44 +0200	[thread overview]
Message-ID: <7dfef7ea-88db-07d3-3ffd-34c8f9dc7eea@codesourcery.com> (raw)
In-Reply-To: <6005cea4-c89e-0c31-1c61-d322dcf072e7@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On 30.09.22 12:41, Tobias Burnus wrote:

Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]

The following two lines slipped in – which I have now removed in my version of the patch:

--- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! First


(Leftover - I wanted to refer to PR105318 - but then decided against it.)



+++ b/libgomp/testsuite/libgomp.fortran/is_device_ptr-2.f90
@@ -0,0 +1,167 @@
+! { dg-do compile }


Likewise leftover - I had an intermittent problem with device testing; hence, I disabled it. It turned out to be unrelated, but it remained.

Side remark: An issue I found with device testing was that I missed the "xx => null()"; in principle obvious (as GCC tried to map the pointer target of the uninitialized pointer), but still easy to miss.

Side note: The OpenMP spec (post-5.2) also clarified the mapping of undefined pointers / requiring the two null init here.

(The second null() is to avoid issues with firstprivatizing/copy-in of the internal pointer representation vs. simply using it (host fallback, unified shared memory). This forces the pointer after the target region to be the same as before the region (now required by the spec!), permitting either implementation without unexpected side effects for the user.)

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

  reply	other threads:[~2022-09-30 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 10:41 Tobias Burnus
2022-09-30 10:57 ` Tobias Burnus [this message]
2022-09-30 11:04 ` Jakub Jelinek
2022-09-30 11:40   ` Tobias Burnus

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=7dfef7ea-88db-07d3-3ffd-34c8f9dc7eea@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /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).