From 77e9a05316b9b56e21086a3e22cc6eb313c2efa3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 16 Apr 2025 21:52:53 +0200 Subject: [PATCH] OpenACC: Improve implicit mapping for non-lexically nested offload regions: Adjust cherry-picked test cases Adjust cherry-picked test cases per OG14 commit b918a7e4b4bdf070bfa9ede48ef9d22f89ff7795 "OpenACC: Improve implicit mapping for non-lexically nested offload regions" (in combination with OG14 commit 5fb2987d33c7296543fa7b8dbeab597fc552b110 "Clarify 'OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P' in 'gcc/tree-pretty-print.cc:dump_omp_clause'" (cherry picked from trunk commit d6e66e7b3a40315ad303344e19bccb4006c51cac)). libgomp/ * testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C: Adjust. * testsuite/libgomp.oacc-c++/exceptions-throw-3.C: Likewise. * testsuite/libgomp.oacc-c++/pr119692-1-1.C: Likewise. * testsuite/libgomp.oacc-c++/pr119692-1-2.C: Likewise. * testsuite/libgomp.oacc-c++/pr119692-1-3.C: Likewise. --- libgomp/ChangeLog.omp | 6 ++++++ libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C | 2 +- libgomp/testsuite/libgomp.oacc-c++/exceptions-throw-3.C | 2 +- libgomp/testsuite/libgomp.oacc-c++/pr119692-1-1.C | 2 +- libgomp/testsuite/libgomp.oacc-c++/pr119692-1-2.C | 2 +- libgomp/testsuite/libgomp.oacc-c++/pr119692-1-3.C | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 44cc3227bbd..56ddb4378fd 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,11 @@ 2025-04-17 Thomas Schwinge + * testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C: Adjust. + * testsuite/libgomp.oacc-c++/exceptions-throw-3.C: Likewise. + * testsuite/libgomp.oacc-c++/pr119692-1-1.C: Likewise. + * testsuite/libgomp.oacc-c++/pr119692-1-2.C: Likewise. + * testsuite/libgomp.oacc-c++/pr119692-1-3.C: Likewise. + Backported from trunk: 2025-04-16 Thomas Schwinge diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C index 4fa419f245f..e9372fa9527 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-3.C @@ -44,6 +44,6 @@ int main() } } -/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI2C2 \[len: [0-9]+\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\]\)$} gimple { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI2C2 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\] \[runtime_implicit\]\)$} gimple { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times {gimple_call <__cxa_bad_cast, } 1 optimized } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-throw-3.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-throw-3.C index 74a62b3abfa..6664f800e69 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-throw-3.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-throw-3.C @@ -37,7 +37,7 @@ int main() } } -/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI11MyException \[len: [0-9]+\]\)$} gimple { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI11MyException \[len: [0-9]+\] \[runtime_implicit\]\)$} gimple { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times {gimple_call <__cxa_allocate_exception, } 1 optimized } } { dg-final { scan-tree-dump-times {gimple_call <__cxa_throw, } 1 optimized } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-1.C b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-1.C index 5c3e037f591..4a876f74f1f 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-1.C +++ b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-1.C @@ -39,4 +39,4 @@ int main() } } -/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI2C2 \[len: [0-9]+\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\]\)$} gimple { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial map\(tofrom:_ZTI2C2 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\] \[runtime_implicit\]\)$} gimple { xfail *-*-* } } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-2.C b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-2.C index 207b183163f..052e423ca08 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-2.C +++ b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-2.C @@ -9,4 +9,4 @@ /* { dg-bogus {using 'vector_length \(32\)', ignoring 1} {} { target openacc_nvidia_accel_selected xfail *-*-* } 0 } */ -/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial default\(none\) map\(tofrom:_ZTI2C2 \[len: [0-9]+\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\]\)$} gimple { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial default\(none\) map\(tofrom:_ZTI2C2 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTI2C1 \[len: [0-9]+\] \[runtime_implicit\]\) map\(tofrom:_ZTV2C1 \[len: [0-9]+\] \[runtime_implicit\]\)$} gimple { xfail *-*-* } } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-3.C b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-3.C index e9b44de8175..fd1844b3754 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-3.C +++ b/libgomp/testsuite/libgomp.oacc-c++/pr119692-1-3.C @@ -9,4 +9,4 @@ /* { dg-bogus {using 'vector_length \(32\)', ignoring 1} {} { target openacc_nvidia_accel_selected xfail *-*-* } 0 } */ -/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial default\(present\) map\(force_present:_ZTI2C2 \[len: [0-9]+\]\) map\(force_present:_ZTI2C1 \[len: [0-9]+\]\) map\(force_present:_ZTV2C1 \[len: [0-9]+\]\)$} gimple { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not {(?n)#pragma omp target oacc_serial default\(present\) map\(force_present:_ZTI2C2 \[len: [0-9]+\] \[runtime_implicit\]\) map\(force_present:_ZTI2C1 \[len: [0-9]+\] \[runtime_implicit\]\) map\(force_present:_ZTV2C1 \[len: [0-9]+\] \[runtime_implicit\]\)$} gimple { xfail *-*-* } } } */ -- 2.47.2