On Mon, 16 Feb 2026, Tomasz Kamiński wrote:

> This test uses atomic<T>::compare_exchange_strong and thus may require
> libatomic and atomic-cmpxchg-word. The requirement on thread-fence and
> non_pch were superfulous.
> 
>       PR libstdc++/124124
> 
> libstdc++-v3/ChangeLog:
> 
>       * testsuite/29_atomics/atomic/cons/zero_padding.cc: Adjust
>       dg-require.
> ---
> It looks like I copied the dg-options from value_init.cc test, and
> forgotten to update them:
>  * no_pch was due feature test macro test,
>  * thread-fence was due use of the loads
> The test however uses compare_exchange.
> 
> Testing on x86_64-linux. zero_padding.cc test already passed.
> OK for trunk when test passes? 

LGTM, these are what compare_exchange_padding.cc uses.

> 
>  libstdc++-v3/testsuite/29_atomics/atomic/cons/zero_padding.cc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/zero_padding.cc 
> b/libstdc++-v3/testsuite/29_atomics/atomic/cons/zero_padding.cc
> index ad48d66de3a..3c8a4a8f428 100644
> --- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/zero_padding.cc
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/zero_padding.cc
> @@ -1,6 +1,6 @@
>  // { dg-do run { target c++11 } }
> -// { dg-require-thread-fence "" }
> -// { dg-add-options no_pch }
> +// { dg-require-atomic-cmpxchg-word "" }
> +// { dg-add-options libatomic }
>  
>  #include <atomic>
>  #include <cstring>
> -- 
> 2.53.0
> 
> 

Reply via email to