public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++-v3/testsuite: Add options to link with libatomic in various tests
@ 2021-03-10 16:08 John David Anglin
  2021-03-10 17:36 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: John David Anglin @ 2021-03-10 16:08 UTC (permalink / raw)
  To: GCC Patches; +Cc: libstdc++

This change fixes various tests that need linking against libatomic on hppa.

Committed to trunk.

Dave
-- 
John David Anglin  dave.anglin@bell.net

Add options to link with libatomic in various tests.

libstdc++-v3/ChangeLog:

	* testsuite/29_atomics/atomic/wait_notify/bool.cc: Add options to
	link with libatomic.
	* testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
	* testsuite/30_threads/barrier/arrive.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
	* testsuite/30_threads/barrier/completion.cc: Likewise.
	* testsuite/30_threads/latch/3.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_until.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc
index 0550f17c69d..b26ffb5749c 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/generic.cc b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/generic.cc
index 9ab1b071c96..e67ab776e71 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/generic.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/generic.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/pointers.cc b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/pointers.cc
index cc63694f596..023354366b3 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/pointers.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/pointers.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/wait_notify/1.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/wait_notify/1.cc
index 45b68c5bbb8..241251fc72f 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/wait_notify/1.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/wait_notify/1.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/barrier/arrive.cc b/libstdc++-v3/testsuite/30_threads/barrier/arrive.cc
index fb0f56292c0..1faad7e9281 100644
--- a/libstdc++-v3/testsuite/30_threads/barrier/arrive.cc
+++ b/libstdc++-v3/testsuite/30_threads/barrier/arrive.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_drop.cc b/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_drop.cc
index 22b40200c80..2e203ea8209 100644
--- a/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_drop.cc
+++ b/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_drop.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_wait.cc b/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_wait.cc
index f9b4fa29063..f5460fbe620 100644
--- a/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/barrier/arrive_and_wait.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/barrier/completion.cc b/libstdc++-v3/testsuite/30_threads/barrier/completion.cc
index 27be0844a60..fd3cb922060 100644
--- a/libstdc++-v3/testsuite/30_threads/barrier/completion.cc
+++ b/libstdc++-v3/testsuite/30_threads/barrier/completion.cc
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/latch/3.cc b/libstdc++-v3/testsuite/30_threads/latch/3.cc
index 079963f131e..2da6a84e2c5 100644
--- a/libstdc++-v3/testsuite/30_threads/latch/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/latch/3.cc
@@ -19,6 +19,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 #include <latch>
 #include <atomic>
diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc
index 03f781e7185..63f3fa3cbf8 100644
--- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc
+++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire.cc
@@ -19,6 +19,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
+// { dg-add-options libatomic }

 #include <semaphore>
 #include <limits>
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 02096a07f2c..e7edc9eeef1 100644
--- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_for.cc
@@ -19,6 +19,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
+// { dg-add-options libatomic }

 #include <semaphore>
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc
index 7d76199f8b3..49ba33b4999 100644
--- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc
@@ -19,6 +19,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-add-options libatomic }

 #include <semaphore>
 #include <chrono>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] libstdc++-v3/testsuite: Add options to link with libatomic in various tests
  2021-03-10 16:08 [committed] libstdc++-v3/testsuite: Add options to link with libatomic in various tests John David Anglin
@ 2021-03-10 17:36 ` Jonathan Wakely
  2021-03-10 18:20   ` John David Anglin
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2021-03-10 17:36 UTC (permalink / raw)
  To: John David Anglin; +Cc: GCC Patches, libstdc++

On 10/03/21 11:08 -0500, John David Anglin wrote:
>This change fixes various tests that need linking against libatomic on hppa.
>
>Committed to trunk.

Thanks.

>diff --git a/libstdc++-v3/testsuite/30_threads/latch/3.cc b/libstdc++-v3/testsuite/30_threads/latch/3.cc
>index 079963f131e..2da6a84e2c5 100644
>--- a/libstdc++-v3/testsuite/30_threads/latch/3.cc
>+++ b/libstdc++-v3/testsuite/30_threads/latch/3.cc
>@@ -19,6 +19,7 @@
> // { dg-do run { target c++2a } }
> // { dg-require-gthreads "" }
> // { dg-additional-options "-pthread" { target pthread } }
>+// { dg-add-options libatomic }
>
> #include <latch>
> #include <atomic>

Most of this looks good but I think we'll want to remove it from this
test again, as we're about to change the atomic type from ptrdiff_t to
int, and so hppa won't need libatomic.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] libstdc++-v3/testsuite: Add options to link with libatomic in various tests
  2021-03-10 17:36 ` Jonathan Wakely
@ 2021-03-10 18:20   ` John David Anglin
  0 siblings, 0 replies; 3+ messages in thread
From: John David Anglin @ 2021-03-10 18:20 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: GCC Patches, libstdc++

On 2021-03-10 12:36 p.m., Jonathan Wakely wrote:
> Most of this looks good but I think we'll want to remove it from this
> test again, as we're about to change the atomic type from ptrdiff_t to
> int, and so hppa won't need libatomic.
That would be good.

-- 
John David Anglin  dave.anglin@bell.net


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-10 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 16:08 [committed] libstdc++-v3/testsuite: Add options to link with libatomic in various tests John David Anglin
2021-03-10 17:36 ` Jonathan Wakely
2021-03-10 18:20   ` John David Anglin

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).