From: Jonathan Wakely <jwakely@redhat.com>
To: Christophe Lyon <christophe.lyon@linaro.org>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org,
kyrylo.tkachov@arm.com, richard.earnshaw@arm.com
Subject: Re: [PATCH v2 2/2] libstdc++: Add dg-require-thread-fence in several tests
Date: Thu, 14 Sep 2023 10:25:02 +0100 [thread overview]
Message-ID: <CACb0b4=vRHQmAgmQzFdVLuDvwbv-qXpO2op+9rkyakizabiF_Q@mail.gmail.com> (raw)
In-Reply-To: <20230914090957.1896347-1-christophe.lyon@linaro.org>
On Thu, 14 Sept 2023 at 10:10, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
> Some targets like arm-eabi with newlib and default settings rely on
> __sync_synchronize() to ensure synchronization. Newlib does not
> implement it by default, to make users aware they have to take special
> care.
>
> This makes a few tests fail to link.
>
> This patch requires the missing thread-fence effective target in the
> tests that need it, making them UNSUPPORTED instead of FAIL and
> UNRESOLVED.
OK for trunk, thanks.
>
> 2023-09-10 Christophe Lyon <christophe.lyon@linaro.org>
>
> libstdc++-v3/
> * testsuite/29_atomics/atomic/compare_exchange_padding.cc: Likewise.
> * testsuite/29_atomics/atomic/cons/value_init.cc: Likewise.
> * testsuite/29_atomics/atomic_float/value_init.cc: Likewise.
> * testsuite/29_atomics/atomic_integral/cons/value_init.cc: Likewise.
> * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc: Likewise.
> * testsuite/29_atomics/atomic_ref/generic.cc: Likewise.
> * testsuite/29_atomics/atomic_ref/integral.cc: Likewise.
> * testsuite/29_atomics/atomic_ref/pointer.cc: Likewise.
> ---
> .../testsuite/29_atomics/atomic/compare_exchange_padding.cc | 1 +
> libstdc++-v3/testsuite/29_atomics/atomic/cons/value_init.cc | 1 +
> libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc | 1 +
> .../testsuite/29_atomics/atomic_integral/cons/value_init.cc | 1 +
> .../testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc | 1 +
> libstdc++-v3/testsuite/29_atomics/atomic_ref/generic.cc | 1 +
> libstdc++-v3/testsuite/29_atomics/atomic_ref/integral.cc | 1 +
> libstdc++-v3/testsuite/29_atomics/atomic_ref/pointer.cc | 1 +
> 8 files changed, 8 insertions(+)
>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/compare_exchange_padding.cc b/libstdc++-v3/testsuite/29_atomics/atomic/compare_exchange_padding.cc
> index c4ab876db2a..2e7ff0307bc 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic/compare_exchange_padding.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic/compare_exchange_padding.cc
> @@ -1,5 +1,6 @@
> // { dg-options "-std=gnu++20" }
> // { dg-do run { target c++20 } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/value_init.cc
> index 47d5a5d5b28..b8019486ccf 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/value_init.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/value_init.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
>
> #include <atomic>
>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
> index 1cd1efb5422..6e89f2fc2a8 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/value_init.cc
> index 96615a7d09f..2f6a48d36d8 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/value_init.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/value_init.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
>
> #include <atomic>
> #include <testsuite_hooks.h>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc
> index 0dab8a23e10..8469ebf8a14 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc
> @@ -1,5 +1,6 @@
> // { dg-options "-std=gnu++20" }
> // { dg-do run { target c++20 } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/generic.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/generic.cc
> index 14f417d1739..adae07f8754 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/generic.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/generic.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/integral.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/integral.cc
> index e03ca921eb9..a98adb7fbba 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/integral.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/integral.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/pointer.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/pointer.cc
> index 8cd0e124986..b9c7d844b8c 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/pointer.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/pointer.cc
> @@ -17,6 +17,7 @@
>
> // { dg-options "-std=gnu++2a" }
> // { dg-do run { target c++2a } }
> +// { dg-require-thread-fence "" }
> // { dg-add-options libatomic }
>
> #include <atomic>
> --
> 2.34.1
>
prev parent reply other threads:[~2023-09-14 9:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-10 19:30 [PATCH 1/2] testsuite: Add and use thread_fence effective-target Christophe Lyon
2023-09-10 19:30 ` [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests Christophe Lyon
2023-09-11 10:59 ` Jonathan Wakely
2023-09-11 12:36 ` Christophe Lyon
2023-09-11 13:10 ` Jonathan Wakely
2023-09-11 13:57 ` Christophe Lyon
2023-09-11 15:22 ` Jonathan Wakely
2023-09-11 15:27 ` Richard Earnshaw (lists)
2023-09-11 15:39 ` Christophe Lyon
2023-09-11 16:11 ` Jonathan Wakely
2023-09-12 7:59 ` Christophe Lyon
2023-09-12 9:07 ` Jonathan Wakely
2023-09-13 15:37 ` Christophe Lyon
2023-09-13 15:56 ` Jonathan Wakely
2023-09-14 9:09 ` [PATCH v2 " Christophe Lyon
2023-09-14 9:25 ` Jonathan Wakely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACb0b4=vRHQmAgmQzFdVLuDvwbv-qXpO2op+9rkyakizabiF_Q@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=christophe.lyon@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
--cc=libstdc++@gcc.gnu.org \
--cc=richard.earnshaw@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).