testsuite: Require thread-fence for 29_atomics/atomic_flag/cons/value_init.cc

Message ID 20230926144058.874C82042E@pchp3.se.axis.com
State Unresolved
Headers
Series testsuite: Require thread-fence for 29_atomics/atomic_flag/cons/value_init.cc |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Hans-Peter Nilsson Sept. 26, 2023, 2:40 p.m. UTC
  Ok to commit?
-- >8 --
A recent patch made __atomic_test_and_set no longer fall
back to emitting non-atomic code, but instead will then emit
a call to __atomic_test_and_set, thereby exposing the need
to gate also this test on support for atomics, similar to
r14-3980-g62b29347c38394.

libstdc++-v3:
	* testsuite/29_atomics/atomic_flag/cons/value_init.cc: Add
	dg-require-thread-fence.
---
 libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/value_init.cc | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jeff Law Sept. 26, 2023, 3:20 p.m. UTC | #1
On 9/26/23 08:40, Hans-Peter Nilsson wrote:
> Ok to commit?
> -- >8 --
> A recent patch made __atomic_test_and_set no longer fall
> back to emitting non-atomic code, but instead will then emit
> a call to __atomic_test_and_set, thereby exposing the need
> to gate also this test on support for atomics, similar to
> r14-3980-g62b29347c38394.
> 
> libstdc++-v3:
> 	* testsuite/29_atomics/atomic_flag/cons/value_init.cc: Add
> 	dg-require-thread-fence.
OK.

Jeff

ps.  Missed you at the Cauldron....
  

Patch

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/value_init.cc
index 084e2930f7e2..f3f38b54dbcd 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/value_init.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/value_init.cc
@@ -16,6 +16,7 @@ 
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do run { target c++20 } }
+// { dg-require-thread-fence "" }
 
 #include <atomic>
 #include <testsuite_hooks.h>