From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id 33FF43856DFE; Fri, 9 Jun 2023 11:18:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33FF43856DFE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686309528; bh=FGkytUhxtsrxFl70tpGHnong/PlEpzo65KSSvNwrIhw=; h=From:To:Subject:Date:From; b=qG27hb2g0hgzHpAmBksJ1r5CYMSOp6S/bhl4Xfdwxbjtp1aB7WGhAs3rbe9zJ5vkt Dh/WOIE/F7hic7Snl9bCZR2uHq68NJq5rnFsMhWddrzo9az0ljeh7ZBGGMShou9YU5 vswNI2HurypqNgNGzKyZY+3Fi3jpOLQc/gJ5Zsqw= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-13] Revert "Fix 'libgomp.{c-c++-common, fortran}/target-present-*' test cases" X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/devel/omp/gcc-13 X-Git-Oldrev: 04538859740c4cf7bfe9e80757f3aff34c7a2f1d X-Git-Newrev: ec6e81d4466c23f9b1f8158e32e752e858553471 Message-Id: <20230609111848.33FF43856DFE@sourceware.org> Date: Fri, 9 Jun 2023 11:18:48 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ec6e81d4466c23f9b1f8158e32e752e858553471 commit ec6e81d4466c23f9b1f8158e32e752e858553471 Author: Tobias Burnus Date: Wed Jun 7 16:35:23 2023 +0200 Revert "Fix 'libgomp.{c-c++-common,fortran}/target-present-*' test cases" This reverts commit f719ab9a3ac51d798b012a5ab7757af2b81b4ae2. in order to revert commit 6e3816fa47c openmp: Add support for the 'present' modifier which then permits to apply the mainline patches of those more cleanly. Diff: --- libgomp/ChangeLog.omp | 12 ++++++++++++ libgomp/testsuite/libgomp.c-c++-common/target-present-1.c | 9 +++------ libgomp/testsuite/libgomp.c-c++-common/target-present-2.c | 11 ++++------- libgomp/testsuite/libgomp.c-c++-common/target-present-3.c | 9 ++++----- libgomp/testsuite/libgomp.fortran/target-present-1.f90 | 9 +++------ libgomp/testsuite/libgomp.fortran/target-present-2.f90 | 13 +++++-------- libgomp/testsuite/libgomp.fortran/target-present-3.f90 | 9 +++------ 7 files changed, 34 insertions(+), 38 deletions(-) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 82c8690fd68..bcdca43964d 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,15 @@ +2023-06-07 Tobias Burnus + + Revert: + 2023-02-15 Thomas Schwinge + + * testsuite/libgomp.c-c++-common/target-present-1.c: Fix. + * testsuite/libgomp.c-c++-common/target-present-2.c: Likewise. + * testsuite/libgomp.c-c++-common/target-present-3.c: Likewise. + * testsuite/libgomp.fortran/target-present-1.f90: Likewise. + * testsuite/libgomp.fortran/target-present-2.f90: Likewise. + * testsuite/libgomp.fortran/target-present-3.f90: Likewise. + 2023-06-07 Tobias Burnus Backported from master: diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-present-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-present-1.c index 55aecd1c8d1..bbc4559b12e 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-present-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-present-1.c @@ -1,4 +1,5 @@ -#include +/* { dg-do run { target offload_target_any } } */ +/* { dg-shouldfail "present error triggered" } */ #define N 100 @@ -17,12 +18,8 @@ int main (void) for (int i = 0; i < N; i++) c[i] = a[i]; - fprintf (stderr, "CheCKpOInT\n"); - /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */ - /* b has not been allocated, so this should result in an error. */ - /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } */ + /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } */ #pragma omp target map (present, to: b) for (int i = 0; i < N; i++) c[i] += b[i]; diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-present-2.c b/libgomp/testsuite/libgomp.c-c++-common/target-present-2.c index 1ce919e62ce..6259c959c04 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-present-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-present-2.c @@ -1,4 +1,5 @@ -#include +/* { dg-do run { target offload_target_any } } */ +/* { dg-shouldfail "present error triggered" } */ #define N 100 @@ -12,17 +13,13 @@ int main (void) } #pragma omp target enter data map (alloc: a, c) - /* a, c have already been allocated, so this should be okay. */ + /* a has already been allocated, so this should be okay. */ #pragma omp target defaultmap (present) for (int i = 0; i < N; i++) c[i] = a[i]; - fprintf (stderr, "CheCKpOInT\n"); - /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */ - /* b has not been allocated, so this should result in an error. */ - /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } */ + /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } */ #pragma omp target defaultmap (present) for (int i = 0; i < N; i++) c[i] += b[i]; diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-present-3.c b/libgomp/testsuite/libgomp.c-c++-common/target-present-3.c index 886969c4c4a..89e648645b2 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-present-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-present-3.c @@ -1,3 +1,6 @@ +/* { dg-do run { target offload_target_any } } */ +/* { dg-shouldfail "present error triggered" } */ + #include #define N 100 @@ -16,12 +19,8 @@ int main (void) /* This should work as a has already been allocated. */ #pragma omp target update to (present: a) - fprintf (stderr, "CheCKpOInT\n"); - /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */ - /* This should fail as b has not been allocated. */ - /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } */ + /* { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } */ #pragma omp target update to (present: b) #pragma omp target exit data map (from: c) diff --git a/libgomp/testsuite/libgomp.fortran/target-present-1.f90 b/libgomp/testsuite/libgomp.fortran/target-present-1.f90 index c56b76e0233..80046011b25 100644 --- a/libgomp/testsuite/libgomp.fortran/target-present-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-present-1.f90 @@ -1,4 +1,5 @@ -! { dg-do run } +! { dg-do run { target offload_target_any } } +! { dg-shouldfail "present error triggered" } program main implicit none @@ -18,12 +19,8 @@ program main end do !$omp end target - print *, "CheCKpOInT" - ! { dg-output "CheCKpOInT(\n|\r\n|\r).*" } - ! b has not been allocated, so this should result in an error. - ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - ! { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } + ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } !$omp target map (present, to: b) do i = 1, N c(i) = c(i) + b(i) diff --git a/libgomp/testsuite/libgomp.fortran/target-present-2.f90 b/libgomp/testsuite/libgomp.fortran/target-present-2.f90 index f62e0c22468..0a38dea1e41 100644 --- a/libgomp/testsuite/libgomp.fortran/target-present-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-present-2.f90 @@ -1,4 +1,5 @@ -! { dg-do run } +! { dg-do run { target offload_target_any } } +! { dg-shouldfail "present error triggered" } program main implicit none @@ -10,20 +11,16 @@ program main b(i) = i * 3 + 1 end do - !$omp target enter data map (alloc: a, c, i) - ! a, c, i have already been allocated, so this should be okay. + !$omp target enter data map (alloc: a) + ! a has already been allocated, so this should be okay. !$omp target defaultmap (present) do i = 1, N c(i) = a(i) end do !$omp end target - print *, "CheCKpOInT" - ! { dg-output "CheCKpOInT(\n|\r\n|\r).*" } - ! b has not been allocated, so this should result in an error. - ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - ! { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } + ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } !$omp target defaultmap (present) do i = 1, N c(i) = c(i) + b(i) diff --git a/libgomp/testsuite/libgomp.fortran/target-present-3.f90 b/libgomp/testsuite/libgomp.fortran/target-present-3.f90 index b186c1c5462..c4deb8652d1 100644 --- a/libgomp/testsuite/libgomp.fortran/target-present-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-present-3.f90 @@ -1,4 +1,5 @@ -! { dg-do run } +! { dg-do run { target offload_target_any } } +! { dg-shouldfail "present error triggered" } program main implicit none @@ -14,12 +15,8 @@ program main ! This should work as a has already been allocated. !$omp target update to (present: a) - print *, "CheCKpOInT" - ! { dg-output "CheCKpOInT(\n|\r\n|\r).*" } - ! This should fail as b has not been allocated. - ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" { target offload_device_nonshared_as } } - ! { dg-shouldfail "present error triggered" { offload_device_nonshared_as } } + ! { dg-output "libgomp: present clause: !omp_target_is_present \\\(0x\[0-9a-f\]+, \[0-9\]+\\\)" } !$omp target update to (present: b) !$omp target exit data map (from: c) end program