public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH v7 4/5] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic
Date: Mon, 21 Aug 2023 18:59:48 +0100	[thread overview]
Message-ID: <20230821185948.782cb287@squid.athome> (raw)
In-Reply-To: <81839b2435cb8b4ae46c09f2ff240eb9f679d389.1692398074.git.julian@codesourcery.com>

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

On Fri, 18 Aug 2023 15:47:50 -0700
Julian Brown <julian@codesourcery.com> wrote:

> This version of the patch scales back the previously-posted version to
> merely add a diagnostic for incorrect usage of component accesses with
> variably-indexed arrays of structs: the only permitted variant is
> where we have multiple indices that are the same, but we could not
> prove so at compile time.  Rather than silently producing the wrong
> result for cases where the indices are in fact different, we error
> out (e.g., "map(dtarr(i)%arrptr, dtarr(j)%arrptr(4:8))", for
> different i/j).

Here's a small followup fix for this one that hopefully addresses the
issue discovered by Linaro's automated pre-commit tester (reported to
me via Maxim, thanks!).

This is probably obvious if the parent patch is OK.

Thanks,

Julian

[-- Attachment #2: map-arrayofstruct-23-1.diff --]
[-- Type: text/x-patch, Size: 1846 bytes --]

commit e3b84ec499ae128320b948d07d258322902e6e70
Author: Julian Brown <julian@codesourcery.com>
Date:   Mon Aug 21 17:51:01 2023 +0000

    OpenMP: Fix map-arrayofstruct-{2,3}.c tests for shared-memory systems
    
    This is a small fix for two testcases when offload_device_nonshared_as
    returns false, e.g. for systems not using GPU offloading.

diff --git a/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-2.c b/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-2.c
index 81f7efc27c98..ff7ce0eb1622 100644
--- a/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-2.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-2.c
@@ -53,6 +53,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-output "(\n|\r|\r\n)" } */
-/* { dg-output "libgomp: Mapped array elements must be the same .*(\n|\r|\r\n)+" } */
+/* { dg-output "(\n|\r|\r\n)" { target offload_device_nonshared_as } } */
+/* { dg-output "libgomp: Mapped array elements must be the same .*(\n|\r|\r\n)+" { target offload_device_nonshared_as } } */
 /* { dg-shouldfail "" { offload_device_nonshared_as } } */
diff --git a/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-3.c b/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-3.c
index 639a0d2bc1e3..770ac2ae1aa6 100644
--- a/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-3.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/map-arrayofstruct-3.c
@@ -63,6 +63,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-output "(\n|\r|\r\n)" } */
-/* { dg-output "libgomp: Mapped array elements must be the same .*(\n|\r|\r\n)+" } */
+/* { dg-output "(\n|\r|\r\n)" { target offload_device_nonshared_as } } */
+/* { dg-output "libgomp: Mapped array elements must be the same .*(\n|\r|\r\n)+" { target offload_device_nonshared_as } } */
 /* { dg-shouldfail "" { offload_device_nonshared_as } } */

  reply	other threads:[~2023-08-21 18:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 22:47 [PATCH v7 0/5] OpenMP/OpenACC: map clause and OMP gimplify rework Julian Brown
2023-08-18 22:47 ` [PATCH v7 1/5] OpenMP/OpenACC: Reindent TO/FROM/_CACHE_ stanza in {c_}finish_omp_clause Julian Brown
2023-08-18 22:47 ` [PATCH v7 2/5] OpenMP/OpenACC: Rework clause expansion and nested struct handling Julian Brown
2023-11-14 10:21   ` Tobias Burnus
2023-11-29 11:43     ` Julian Brown
2023-11-29 16:03       ` Tobias Burnus
2023-12-14  7:14       ` [committed] testsuite: Fix up target-enter-data-1.c on 32-bit targets Jakub Jelinek
2023-12-14 10:09         ` Julian Brown
2023-08-18 22:47 ` [PATCH v7 3/5] OpenMP: Pointers and member mappings Julian Brown
2023-12-06 11:36   ` Tobias Burnus
2023-12-07 17:24     ` Julian Brown
2023-12-11 11:44       ` Tobias Burnus
2023-08-18 22:47 ` [PATCH v7 4/5] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic Julian Brown
2023-08-21 17:59   ` Julian Brown [this message]
2023-12-14 14:26   ` Tobias Burnus
2023-12-15 13:00     ` Thomas Schwinge
2023-08-18 22:47 ` [PATCH v7 5/5] OpenMP/OpenACC: Reorganise OMP map clause handling in gimplify.cc Julian Brown
2023-12-16 13:25   ` Julian Brown
2023-12-19 15:41     ` Tobias Burnus
2023-12-20 21:29       ` Julian Brown
2023-12-21  8:51         ` 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=20230821185948.782cb287@squid.athome \
    --to=julian@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).