On Fri, 18 Aug 2023 15:47:50 -0700 Julian Brown <jul...@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
commit e3b84ec499ae128320b948d07d258322902e6e70 Author: Julian Brown <jul...@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 } } */