From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id BAE5938582BC; Fri, 15 Sep 2023 23:19:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAE5938582BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694819963; bh=2VilsKG92dDq/e7qihb6Mn3p+rLDfJu0xBEZt+VdBpw=; h=From:To:Subject:Date:From; b=F0V4tb14cTOL/KSkCA8+O20wwA6G5dq6hGa4KFOhPBqqp6zOkNDb9RYdYBvlzkFgq gmh40ciPI6kvo75k/7LggBYZ/qAyGHplYHGl9MYR8DgVc7lyRoKQHMtLJhGbMrnaOx n2seSdmzNsCe5PIwIzj5HHnXmvWW5farZuiQBuqM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-4072] libstdc++: Do not require effective target pthread for some tests X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 8ccae1639fa66ac9566e337bb2fd0ee6366f3f7e X-Git-Newrev: 0ff31212eb6dd0f7b64f9c51be9850eee2b8f83b Message-Id: <20230915231923.BAE5938582BC@sourceware.org> Date: Fri, 15 Sep 2023 23:19:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:0ff31212eb6dd0f7b64f9c51be9850eee2b8f83b commit r14-4072-g0ff31212eb6dd0f7b64f9c51be9850eee2b8f83b Author: Jonathan Wakely Date: Fri Sep 15 14:49:36 2023 +0100 libstdc++: Do not require effective target pthread for some tests We can remove { dg-require-effective-target pthread } and allow these tests non-pthread targets and conditionally adding -pthread only for pthread targets. Also remove the { dg-options "-std=gnu++20" } that is no longer needed. libstdc++-v3/ChangeLog: * testsuite/29_atomics/atomic_ref/wait_notify.cc: Do not restrict to pthreads targets. * testsuite/30_threads/jthread/3.cc: Likewise. * testsuite/30_threads/semaphore/100806.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise. Diff: --- libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/jthread/3.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/100806.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc index ede46467dac..05316f7a15e 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc @@ -1,6 +1,5 @@ -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/jthread/3.cc b/libstdc++-v3/testsuite/30_threads/jthread/3.cc index ef0252a678f..796481c5ef6 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/3.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/3.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do compile { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do compile { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } #include diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc b/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc index 2fa2628a278..c770f05be00 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/100806.cc @@ -1,6 +1,5 @@ -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc index b9661aa8fa2..082ab17dd16 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc index 250bfe37f7e..901e15c08ed 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic } diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc index a8f0fe3ad2c..8828212ed61 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_posix.cc @@ -15,9 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a -pthread" } -// { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } +// { dg-do run { target c++20 } } +// { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } // { dg-add-options libatomic }