[2/2] libstdc++: Add dg-require-thread-fence in several tests
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Testing passed
|
| linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Testing passed
|
| linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Testing passed
|
| linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Testing passed
|
Commit Message
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.
2023-09-10 Christophe Lyon <christophe.lyon@linaro.org>
libstdc++-v3/
* testsuite/20_util/to_address/debug.cc: Require thread-fence effective target.
* testsuite/21_strings/basic_string/cons/char/self_move.cc: Likewise.
* testsuite/21_strings/basic_string/debug/1_neg.cc: Likewise.
* testsuite/21_strings/basic_string/debug/2_neg.cc: Likewise.
* testsuite/21_strings/basic_string/debug/find1_neg.cc: Likewise.
* testsuite/21_strings/basic_string/debug/find2_neg.cc: Likewise.
* testsuite/21_strings/basic_string/hash/debug.cc: Likewise.
* testsuite/21_strings/basic_string/requirements/citerators.cc: Likewise.
* testsuite/21_strings/basic_string/requirements/exception/basic.cc: Likewise.
* testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc:
Likewise.
* testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc:
Likewise.
* testsuite/21_strings/debug/shrink_to_fit.cc: Likewise.
* testsuite/23_containers/array/debug/back1_neg.cc: Likewise.
* testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
* testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
* testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
* testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc: Likewise.
* testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: Likewise.
* testsuite/23_containers/deque/cons/self_move.cc: Likewise.
* testsuite/23_containers/deque/debug/98466.cc: Likewise.
* testsuite/23_containers/deque/debug/assign4_neg.cc: Likewise.
* testsuite/23_containers/deque/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/deque/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/deque/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/deque/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/deque/debug/invalidation/3.cc: Likewise.
* testsuite/23_containers/deque/debug/invalidation/4.cc: Likewise.
* testsuite/23_containers/forward_list/cons/self_move.cc: Likewise.
* testsuite/23_containers/forward_list/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/forward_list/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/forward_list/debug/move_neg.cc: Likewise.
* testsuite/23_containers/list/cons/self_move.cc: Likewise.
* testsuite/23_containers/list/debug/assign4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/list/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/list/debug/invalidation/3.cc: Likewise.
* testsuite/23_containers/list/debug/invalidation/4.cc: Likewise.
* testsuite/23_containers/map/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/map/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/map/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/map/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/map/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/map/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/map/debug/move_neg.cc: Likewise.
* testsuite/23_containers/map/modifiers/erase/end_neg.cc: Likewise.
* testsuite/23_containers/map/modifiers/insert/16813.cc: Likewise.
* testsuite/23_containers/multimap/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/multimap/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/multimap/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/multimap/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/multimap/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/multimap/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/multimap/debug/move_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/multiset/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/multiset/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/move_neg.cc: Likewise.
* testsuite/23_containers/set/cons/self_move.cc: Likewise.
* testsuite/23_containers/set/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/set/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/set/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/set/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/set/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/set/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/set/debug/move_neg.cc: Likewise.
* testsuite/23_containers/span/back_assert_neg.cc: Likewise.
* testsuite/23_containers/span/cons_1_assert_neg.cc: Likewise.
* testsuite/23_containers/span/cons_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_assert_neg.cc: Likewise.
* testsuite/23_containers/span/front_assert_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/98466.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/debug/move_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/move_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/move_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/cons/self_move.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/construct5_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/move_neg.cc: Likewise.
* testsuite/23_containers/vector/cons/self_move.cc: Likewise.
* testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/assign4_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/construct4_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/insert4_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/insert6_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/insert7_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/invalidation/1.cc: Likewise.
* testsuite/23_containers/vector/debug/invalidation/2.cc: Likewise.
* testsuite/23_containers/vector/debug/invalidation/3.cc: Likewise.
* testsuite/23_containers/vector/debug/invalidation/4.cc: Likewise.
* testsuite/23_containers/vector/debug/move_assign_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/move_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/mutex_association.cc: Likewise.
* testsuite/24_iterators/move_iterator/debug_neg.cc: Likewise.
* testsuite/24_iterators/normal_iterator/debug_neg.cc: Likewise.
* testsuite/24_iterators/range_operations/advance_debug_neg.cc: Likewise.
* testsuite/24_iterators/reverse_iterator/debug_neg.cc: Likewise.
* testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
* testsuite/25_algorithms/copy/86658.cc: Likewise.
* testsuite/25_algorithms/copy/debug/99402.cc: Likewise.
* testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
* testsuite/25_algorithms/for_each/for_each_n_debug.cc: Likewise.
* testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
* testsuite/25_algorithms/sample/2.cc: Likewise.
* testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-1_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-2_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-3_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-4_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-5_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-6_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-7_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask-8_neg.cc: Likewise.
* testsuite/26_numerics/valarray/mask.cc: Likewise.
* 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/experimental/net/timer/waitable/dest.cc: Likewise.
* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
* testsuite/experimental/polymorphic_allocator/construct_pair.cc: Likewise.
---
libstdc++-v3/testsuite/20_util/to_address/debug.cc | 1 +
.../testsuite/21_strings/basic_string/cons/char/self_move.cc | 1 +
libstdc++-v3/testsuite/21_strings/basic_string/debug/1_neg.cc | 1 +
libstdc++-v3/testsuite/21_strings/basic_string/debug/2_neg.cc | 1 +
.../testsuite/21_strings/basic_string/debug/find1_neg.cc | 1 +
.../testsuite/21_strings/basic_string/debug/find2_neg.cc | 1 +
libstdc++-v3/testsuite/21_strings/basic_string/hash/debug.cc | 1 +
.../21_strings/basic_string/requirements/citerators.cc | 1 +
.../21_strings/basic_string/requirements/exception/basic.cc | 1 +
.../requirements/exception/generation_prohibited.cc | 1 +
.../requirements/exception/propagation_consistent.cc | 1 +
libstdc++-v3/testsuite/21_strings/debug/shrink_to_fit.cc | 1 +
libstdc++-v3/testsuite/23_containers/array/debug/back1_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc | 1 +
.../23_containers/array/debug/square_brackets_operator1_neg.cc | 1 +
.../23_containers/array/debug/square_brackets_operator2_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/deque/cons/self_move.cc | 1 +
libstdc++-v3/testsuite/23_containers/deque/debug/98466.cc | 1 +
libstdc++-v3/testsuite/23_containers/deque/debug/assign4_neg.cc | 1 +
.../testsuite/23_containers/deque/debug/construct4_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/deque/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/deque/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/deque/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/deque/debug/invalidation/3.cc | 2 ++
.../testsuite/23_containers/deque/debug/invalidation/4.cc | 2 ++
.../testsuite/23_containers/forward_list/cons/self_move.cc | 1 +
.../23_containers/forward_list/debug/construct4_neg.cc | 1 +
.../23_containers/forward_list/debug/move_assign_neg.cc | 1 +
.../testsuite/23_containers/forward_list/debug/move_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/list/cons/self_move.cc | 1 +
libstdc++-v3/testsuite/23_containers/list/debug/assign4_neg.cc | 1 +
.../testsuite/23_containers/list/debug/construct4_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/list/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/list/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/list/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/list/debug/invalidation/3.cc | 2 ++
.../testsuite/23_containers/list/debug/invalidation/4.cc | 2 ++
.../testsuite/23_containers/map/debug/construct4_neg.cc | 1 +
.../testsuite/23_containers/map/debug/construct5_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/map/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/map/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/map/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/map/debug/move_assign_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/map/debug/move_neg.cc | 1 +
.../testsuite/23_containers/map/modifiers/erase/end_neg.cc | 1 +
.../testsuite/23_containers/map/modifiers/insert/16813.cc | 2 ++
.../testsuite/23_containers/multimap/debug/construct4_neg.cc | 1 +
.../testsuite/23_containers/multimap/debug/construct5_neg.cc | 1 +
.../testsuite/23_containers/multimap/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/multimap/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/multimap/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/multimap/debug/move_assign_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/multimap/debug/move_neg.cc | 1 +
.../testsuite/23_containers/multiset/debug/construct4_neg.cc | 1 +
.../testsuite/23_containers/multiset/debug/construct5_neg.cc | 2 ++
.../testsuite/23_containers/multiset/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/multiset/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/multiset/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/multiset/debug/move_assign_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/multiset/debug/move_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/set/cons/self_move.cc | 1 +
.../testsuite/23_containers/set/debug/construct4_neg.cc | 1 +
.../testsuite/23_containers/set/debug/construct5_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/set/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/set/debug/invalidation/1.cc | 2 ++
.../testsuite/23_containers/set/debug/invalidation/2.cc | 2 ++
.../testsuite/23_containers/set/debug/move_assign_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/set/debug/move_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/cons_1_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/cons_2_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc | 1 +
.../testsuite/23_containers/span/index_op_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc | 1 +
.../testsuite/23_containers/span/subspan_2_assert_neg.cc | 1 +
.../testsuite/23_containers/span/subspan_3_assert_neg.cc | 1 +
.../testsuite/23_containers/span/subspan_4_assert_neg.cc | 1 +
.../testsuite/23_containers/span/subspan_5_assert_neg.cc | 1 +
.../testsuite/23_containers/span/subspan_6_assert_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc | 1 +
.../testsuite/23_containers/unordered_map/debug/98466.cc | 1 +
.../23_containers/unordered_map/debug/construct4_neg.cc | 1 +
.../23_containers/unordered_map/debug/construct5_neg.cc | 1 +
.../testsuite/23_containers/unordered_map/debug/insert4_neg.cc | 1 +
.../23_containers/unordered_map/debug/move_assign_neg.cc | 1 +
.../testsuite/23_containers/unordered_map/debug/move_neg.cc | 1 +
.../23_containers/unordered_multimap/debug/construct4_neg.cc | 1 +
.../23_containers/unordered_multimap/debug/construct5_neg.cc | 1 +
.../23_containers/unordered_multimap/debug/insert4_neg.cc | 1 +
.../23_containers/unordered_multimap/debug/move_assign_neg.cc | 1 +
.../23_containers/unordered_multimap/debug/move_neg.cc | 1 +
.../23_containers/unordered_multiset/debug/construct4_neg.cc | 1 +
.../23_containers/unordered_multiset/debug/construct5_neg.cc | 1 +
.../23_containers/unordered_multiset/debug/insert4_neg.cc | 1 +
.../23_containers/unordered_multiset/debug/move_assign_neg.cc | 1 +
.../23_containers/unordered_multiset/debug/move_neg.cc | 1 +
.../testsuite/23_containers/unordered_set/cons/self_move.cc | 1 +
.../23_containers/unordered_set/debug/construct4_neg.cc | 1 +
.../23_containers/unordered_set/debug/construct5_neg.cc | 1 +
.../testsuite/23_containers/unordered_set/debug/insert4_neg.cc | 1 +
.../23_containers/unordered_set/debug/move_assign_neg.cc | 1 +
.../testsuite/23_containers/unordered_set/debug/move_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/vector/cons/self_move.cc | 1 +
.../23_containers/vector/debug/assign4_backtrace_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/assign4_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/construct4_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/insert4_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/insert6_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/insert7_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/invalidation/1.cc | 1 +
.../testsuite/23_containers/vector/debug/invalidation/2.cc | 1 +
.../testsuite/23_containers/vector/debug/invalidation/3.cc | 1 +
.../testsuite/23_containers/vector/debug/invalidation/4.cc | 1 +
.../testsuite/23_containers/vector/debug/move_assign_neg.cc | 1 +
libstdc++-v3/testsuite/23_containers/vector/debug/move_neg.cc | 1 +
.../testsuite/23_containers/vector/debug/mutex_association.cc | 1 +
libstdc++-v3/testsuite/24_iterators/move_iterator/debug_neg.cc | 2 ++
.../testsuite/24_iterators/normal_iterator/debug_neg.cc | 1 +
.../24_iterators/range_operations/advance_debug_neg.cc | 1 +
.../testsuite/24_iterators/reverse_iterator/debug_neg.cc | 1 +
.../testsuite/25_algorithms/binary_search/partitioned.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/copy/86658.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/copy/debug/99402.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/equal_range/partitioned.cc | 1 +
.../testsuite/25_algorithms/for_each/for_each_n_debug.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/lower_bound/partitioned.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/sample/2.cc | 1 +
libstdc++-v3/testsuite/25_algorithms/upper_bound/partitioned.cc | 1 +
.../testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-1_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-2_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-3_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-4_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-5_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-6_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-7_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask-8_neg.cc | 1 +
libstdc++-v3/testsuite/26_numerics/valarray/mask.cc | 1 +
.../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 +
libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc | 1 +
libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc | 1 +
.../experimental/polymorphic_allocator/construct_pair.cc | 1 +
154 files changed, 173 insertions(+)
Comments
On Sun, 10 Sept 2023 at 20:31, 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.
Does this mean those features are unusable on the target, or just that
users need to provide their own __sync_synchronize to use them?
>
> This patch requires the missing thread-fence effective target in the
> tests that need it, making them UNSUPPORTED instead of FAIL and
> UNRESOLVED.
Some of the modified tests should not be using
__gnu_debug::_Safe_sequence_base::_M_detach_all(), because they don't
use the Debug Mode. I don't know where those linker errors come from.
For example, the 23_containers/span/*assert_neg.cc and
26_numerics/valarray/* tests shouldn't use debug iterators or atomics.
Neither should 25_algorithms/sample/2.cc nor
26_numerics/bit/bit.pow.two/bit_ceil_neg.cc
The last three in the patch shouldn't use it either:
> diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> index cb818708aef..372ed6e0c00 100644
> --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> @@ -18,6 +18,7 @@
> // { dg-do run { target c++14 } }
> // { dg-add-options libatomic }
> // { dg-xfail-if "poll not available" { *-*-rtems* } }
> +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>
> #include <experimental/timer>
> #include <testsuite_hooks.h>
> diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> index ae51979c3b4..8383e0be6a4 100644
> --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> @@ -18,6 +18,7 @@
> // { dg-do run { target c++14 } }
> // { dg-add-options libatomic }
> // { dg-xfail-if "poll not available" { *-*-rtems* } }
> +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>
> #include <experimental/timer>
> #include <testsuite_hooks.h>
> diff --git a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> index 960c1d253b5..42de45619a8 100644
> --- a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> +++ b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> @@ -16,6 +16,7 @@
> // <http://www.gnu.org/licenses/>.
>
> // { dg-do run { target c++14 } }
> +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>
> #include <experimental/memory_resource>
> #include <utility>
I'm concerned with how much of the testsuite is being completely
disabled for this target.
Any tests with "debug" in the path are probably relying on the debug
mode, and any that use -D_GLIBCXX_DEBUG in dg-options are. And I
suppose it's expected that 29_atomics/* tests rely on atomic
synchronization, but it's unfortunate that those now can't be tested
for arm-eabi, and I don't understand why it only affects eight of the
atomics tests not all the other ones.
Something doesn't seem right here.
On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
> On Sun, 10 Sept 2023 at 20:31, 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.
>
> Does this mean those features are unusable on the target, or just that
> users need to provide their own __sync_synchronize to use them?
>
IIUC the user is expected to provide them.
Looks like we discussed this in the past :-)
In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
see the pointer to Ramana's comment:
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
The default arch for arm-eabi is armv4t which is very old.
When running the testsuite with something more recent (either as default by
configuring GCC --with-arch=XXX or by forcing -march/-mcpu via
dejagnu's target-board), the compiler generates barrier instructions and
there are no such errors.
For instance, here is a log with the defaults:
https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
and a log when we target cortex-m0 which is still a very small cpu but has
barriers:
https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
I somehow wanted to get rid of such errors with the default
configuration....
> >
> > This patch requires the missing thread-fence effective target in the
> > tests that need it, making them UNSUPPORTED instead of FAIL and
> > UNRESOLVED.
>
> Some of the modified tests should not be using
> __gnu_debug::_Safe_sequence_base::_M_detach_all(), because they don't
> use the Debug Mode. I don't know where those linker errors come from.
> For example, the 23_containers/span/*assert_neg.cc and
> 26_numerics/valarray/* tests shouldn't use debug iterators or atomics.
> Neither should 25_algorithms/sample/2.cc nor
> 26_numerics/bit/bit.pow.two/bit_ceil_neg.cc
>
Ouch! I had the feeling this patch wouldn't count as obvious :-)
I confess I didn't analyze the linker map for every single test updated by
this patch....
I can have a deeper look based on your comment below, excluding those that
look "OK"
> The last three in the patch shouldn't use it either:
>
> > diff --git
> a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> > index cb818708aef..372ed6e0c00 100644
> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> > @@ -18,6 +18,7 @@
> > // { dg-do run { target c++14 } }
> > // { dg-add-options libatomic }
> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >
> > #include <experimental/timer>
> > #include <testsuite_hooks.h>
> > diff --git
> a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> > index ae51979c3b4..8383e0be6a4 100644
> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> > @@ -18,6 +18,7 @@
> > // { dg-do run { target c++14 } }
> > // { dg-add-options libatomic }
> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >
> > #include <experimental/timer>
> > #include <testsuite_hooks.h>
> > diff --git
> a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> > index 960c1d253b5..42de45619a8 100644
> > ---
> a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> > +++
> b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> > @@ -16,6 +16,7 @@
> > // <http://www.gnu.org/licenses/>.
> >
> > // { dg-do run { target c++14 } }
> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >
> > #include <experimental/memory_resource>
> > #include <utility>
>
>
> I'm concerned with how much of the testsuite is being completely
> disabled for this target.
>
I think that depends on which "flavour" of arm-eabi we are looking at.
I'm trying to cleanup some of the "obvious" failures, and that proves to be
tedious:
- quite a few gcc/g++ tests have problems when overriding -mcpu/-march with
dejagnu's target-board
- so I thought a first step could be to clean the default configuration,
but as said above it targets a very old architecture
>
> Any tests with "debug" in the path are probably relying on the debug
> mode, and any that use -D_GLIBCXX_DEBUG in dg-options are. And I
> suppose it's expected that 29_atomics/* tests rely on atomic
> synchronization, but it's unfortunate that those now can't be tested
> for arm-eabi, and I don't understand why it only affects eight of the
>
that's only the "default" arm-eabi, it does not happen in other non-default
arm-eabi (well I didn't check all possible cases)
> atomics tests not all the other ones.
>
> Something doesn't seem right here.
>
>
Thanks,
Christophe
On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
>
>
> On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On Sun, 10 Sept 2023 at 20:31, 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.
>>
>> Does this mean those features are unusable on the target, or just that
>> users need to provide their own __sync_synchronize to use them?
>
>
> IIUC the user is expected to provide them.
> Looks like we discussed this in the past :-)
> In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
> see the pointer to Ramana's comment: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
Oh yes, thanks for the reminder!
>
> The default arch for arm-eabi is armv4t which is very old.
> When running the testsuite with something more recent (either as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's target-board), the compiler generates barrier instructions and there are no such errors.
Ah yes, that's fine then.
> For instance, here is a log with the defaults:
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
> and a log when we target cortex-m0 which is still a very small cpu but has barriers:
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
>
> I somehow wanted to get rid of such errors with the default configuration....
Yep, that makes sense, and we'll still be testing them for newer
arches on the target, so it's not completely disabling those parts of
the testsuite.
But I'm still curious why some of those tests need this change. I
think the ones I noted below are probably failing for some other
reasons.
>
>>
>> >
>> > This patch requires the missing thread-fence effective target in the
>> > tests that need it, making them UNSUPPORTED instead of FAIL and
>> > UNRESOLVED.
>>
>> Some of the modified tests should not be using
>> __gnu_debug::_Safe_sequence_base::_M_detach_all(), because they don't
>> use the Debug Mode. I don't know where those linker errors come from.
>> For example, the 23_containers/span/*assert_neg.cc and
>> 26_numerics/valarray/* tests shouldn't use debug iterators or atomics.
>> Neither should 25_algorithms/sample/2.cc nor
>> 26_numerics/bit/bit.pow.two/bit_ceil_neg.cc
>
>
> Ouch! I had the feeling this patch wouldn't count as obvious :-)
>
> I confess I didn't analyze the linker map for every single test updated by this patch....
> I can have a deeper look based on your comment below, excluding those that look "OK"
>
>>
>> The last three in the patch shouldn't use it either:
>>
>> > diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
>> > index cb818708aef..372ed6e0c00 100644
>> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
>> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
>> > @@ -18,6 +18,7 @@
>> > // { dg-do run { target c++14 } }
>> > // { dg-add-options libatomic }
>> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
>> > +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>> >
>> > #include <experimental/timer>
>> > #include <testsuite_hooks.h>
>> > diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
>> > index ae51979c3b4..8383e0be6a4 100644
>> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
>> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
>> > @@ -18,6 +18,7 @@
>> > // { dg-do run { target c++14 } }
>> > // { dg-add-options libatomic }
>> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
>> > +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>> >
>> > #include <experimental/timer>
>> > #include <testsuite_hooks.h>
>> > diff --git a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
>> > index 960c1d253b5..42de45619a8 100644
>> > --- a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
>> > +++ b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
>> > @@ -16,6 +16,7 @@
>> > // <http://www.gnu.org/licenses/>.
>> >
>> > // { dg-do run { target c++14 } }
>> > +// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
>> >
>> > #include <experimental/memory_resource>
>> > #include <utility>
>>
>>
>> I'm concerned with how much of the testsuite is being completely
>> disabled for this target.
>
> I think that depends on which "flavour" of arm-eabi we are looking at.
> I'm trying to cleanup some of the "obvious" failures, and that proves to be tedious:
> - quite a few gcc/g++ tests have problems when overriding -mcpu/-march with dejagnu's target-board
> - so I thought a first step could be to clean the default configuration, but as said above it targets a very old architecture
>
>>
>>
>> Any tests with "debug" in the path are probably relying on the debug
>> mode, and any that use -D_GLIBCXX_DEBUG in dg-options are. And I
>> suppose it's expected that 29_atomics/* tests rely on atomic
>> synchronization, but it's unfortunate that those now can't be tested
>> for arm-eabi, and I don't understand why it only affects eight of the
>
> that's only the "default" arm-eabi, it does not happen in other non-default arm-eabi (well I didn't check all possible cases)
>
>>
>> atomics tests not all the other ones.
>>
>> Something doesn't seem right here.
>>
>
> Thanks,
>
> Christophe
>
On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com> wrote:
> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
> >
> >
> >
> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >>
> >> On Sun, 10 Sept 2023 at 20:31, 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.
> >>
> >> Does this mean those features are unusable on the target, or just that
> >> users need to provide their own __sync_synchronize to use them?
> >
> >
> > IIUC the user is expected to provide them.
> > Looks like we discussed this in the past :-)
> > In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
> > see the pointer to Ramana's comment:
> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
>
> Oh yes, thanks for the reminder!
>
> >
> > The default arch for arm-eabi is armv4t which is very old.
> > When running the testsuite with something more recent (either as default
> by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's
> target-board), the compiler generates barrier instructions and there are no
> such errors.
>
> Ah yes, that's fine then.
>
> > For instance, here is a log with the defaults:
> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
> > and a log when we target cortex-m0 which is still a very small cpu but
> has barriers:
> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
> >
> > I somehow wanted to get rid of such errors with the default
> configuration....
>
> Yep, that makes sense, and we'll still be testing them for newer
> arches on the target, so it's not completely disabling those parts of
> the testsuite.
>
> But I'm still curious why some of those tests need this change. I
> think the ones I noted below are probably failing for some other
> reasons.
>
> Just looked at 23_containers/span/back_assert_neg.cc, the linker says it
needs
arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char
const*, int, char const*, char const*))
and indeed debug.o has a reference to __sync_synchronize
>
> >>
> >> >
> >> > This patch requires the missing thread-fence effective target in the
> >> > tests that need it, making them UNSUPPORTED instead of FAIL and
> >> > UNRESOLVED.
> >>
> >> Some of the modified tests should not be using
> >> __gnu_debug::_Safe_sequence_base::_M_detach_all(), because they don't
> >> use the Debug Mode. I don't know where those linker errors come from.
> >> For example, the 23_containers/span/*assert_neg.cc and
> >> 26_numerics/valarray/* tests shouldn't use debug iterators or atomics.
> >> Neither should 25_algorithms/sample/2.cc nor
> >> 26_numerics/bit/bit.pow.two/bit_ceil_neg.cc
> >
> >
> > Ouch! I had the feeling this patch wouldn't count as obvious :-)
> >
> > I confess I didn't analyze the linker map for every single test updated
> by this patch....
> > I can have a deeper look based on your comment below, excluding those
> that look "OK"
> >
> >>
> >> The last three in the patch shouldn't use it either:
> >>
> >> > diff --git
> a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> >> > index cb818708aef..372ed6e0c00 100644
> >> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> >> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
> >> > @@ -18,6 +18,7 @@
> >> > // { dg-do run { target c++14 } }
> >> > // { dg-add-options libatomic }
> >> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
> >> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >> >
> >> > #include <experimental/timer>
> >> > #include <testsuite_hooks.h>
> >> > diff --git
> a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> >> > index ae51979c3b4..8383e0be6a4 100644
> >> > --- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> >> > +++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
> >> > @@ -18,6 +18,7 @@
> >> > // { dg-do run { target c++14 } }
> >> > // { dg-add-options libatomic }
> >> > // { dg-xfail-if "poll not available" { *-*-rtems* } }
> >> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >> >
> >> > #include <experimental/timer>
> >> > #include <testsuite_hooks.h>
> >> > diff --git
> a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> >> > index 960c1d253b5..42de45619a8 100644
> >> > ---
> a/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> >> > +++
> b/libstdc++-v3/testsuite/experimental/polymorphic_allocator/construct_pair.cc
> >> > @@ -16,6 +16,7 @@
> >> > // <http://www.gnu.org/licenses/>.
> >> >
> >> > // { dg-do run { target c++14 } }
> >> > +// { dg-require-thread-fence "" } // needed by
> __gnu_debug::_Safe_sequence_base::_M_detach_all()
> >> >
> >> > #include <experimental/memory_resource>
> >> > #include <utility>
> >>
> >>
> >> I'm concerned with how much of the testsuite is being completely
> >> disabled for this target.
> >
> > I think that depends on which "flavour" of arm-eabi we are looking at.
> > I'm trying to cleanup some of the "obvious" failures, and that proves to
> be tedious:
> > - quite a few gcc/g++ tests have problems when overriding -mcpu/-march
> with dejagnu's target-board
> > - so I thought a first step could be to clean the default configuration,
> but as said above it targets a very old architecture
> >
> >>
> >>
> >> Any tests with "debug" in the path are probably relying on the debug
> >> mode, and any that use -D_GLIBCXX_DEBUG in dg-options are. And I
> >> suppose it's expected that 29_atomics/* tests rely on atomic
> >> synchronization, but it's unfortunate that those now can't be tested
> >> for arm-eabi, and I don't understand why it only affects eight of the
> >
> > that's only the "default" arm-eabi, it does not happen in other
> non-default arm-eabi (well I didn't check all possible cases)
> >
> >>
> >> atomics tests not all the other ones.
> >>
> >> Something doesn't seem right here.
> >>
> >
> > Thanks,
> >
> > Christophe
> >
>
>
On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
>
>
> On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
>> <christophe.lyon@linaro.org> wrote:
>> >
>> >
>> >
>> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >>
>> >> On Sun, 10 Sept 2023 at 20:31, 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.
>> >>
>> >> Does this mean those features are unusable on the target, or just that
>> >> users need to provide their own __sync_synchronize to use them?
>> >
>> >
>> > IIUC the user is expected to provide them.
>> > Looks like we discussed this in the past :-)
>> > In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
>> > see the pointer to Ramana's comment: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
>>
>> Oh yes, thanks for the reminder!
>>
>> >
>> > The default arch for arm-eabi is armv4t which is very old.
>> > When running the testsuite with something more recent (either as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's target-board), the compiler generates barrier instructions and there are no such errors.
>>
>> Ah yes, that's fine then.
>>
>> > For instance, here is a log with the defaults:
>> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
>> > and a log when we target cortex-m0 which is still a very small cpu but has barriers:
>> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
>> >
>> > I somehow wanted to get rid of such errors with the default configuration....
>>
>> Yep, that makes sense, and we'll still be testing them for newer
>> arches on the target, so it's not completely disabling those parts of
>> the testsuite.
>>
>> But I'm still curious why some of those tests need this change. I
>> think the ones I noted below are probably failing for some other
>> reasons.
>>
> Just looked at 23_containers/span/back_assert_neg.cc, the linker says it needs
> arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
> ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char const*, int, char const*, char const*))
> and indeed debug.o has a reference to __sync_synchronize
Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
there are no dependencies on anything else in that file, including the
_M_detach member function that uses atomics.
This would also be solved by -Wl,--gc-sections :-)
I think it would be better to move __glibcxx_assert_fail to a new
file, so that it doesn't make every assertion unnecessarily depend on
__sync_synchronize. I'll do that now.
We could also make the atomics in debug.o conditional, so that debug
mode doesn't depend on __sync_synchronize for single-threaded targets.
Does the arm4t arch have pthreads support in newlib? I didn't bother
making the use of atomics conditional, because performance is not
really a priority for debug mode bookkeeping. But the problem here
isn't just a slight performance overhead of atomics, it's that they
aren't even supported for arm4t.
On 11/09/2023 16:22, Jonathan Wakely via Gcc-patches wrote:
> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
>>
>>
>>
>> On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>
>>> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
>>> <christophe.lyon@linaro.org> wrote:
>>>>
>>>>
>>>>
>>>> On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>>>
>>>>> On Sun, 10 Sept 2023 at 20:31, 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.
>>>>>
>>>>> Does this mean those features are unusable on the target, or just that
>>>>> users need to provide their own __sync_synchronize to use them?
>>>>
>>>>
>>>> IIUC the user is expected to provide them.
>>>> Looks like we discussed this in the past :-)
>>>> In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
>>>> see the pointer to Ramana's comment: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
>>>
>>> Oh yes, thanks for the reminder!
>>>
>>>>
>>>> The default arch for arm-eabi is armv4t which is very old.
>>>> When running the testsuite with something more recent (either as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's target-board), the compiler generates barrier instructions and there are no such errors.
>>>
>>> Ah yes, that's fine then.
>>>
>>>> For instance, here is a log with the defaults:
>>>> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
>>>> and a log when we target cortex-m0 which is still a very small cpu but has barriers:
>>>> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
>>>>
>>>> I somehow wanted to get rid of such errors with the default configuration....
>>>
>>> Yep, that makes sense, and we'll still be testing them for newer
>>> arches on the target, so it's not completely disabling those parts of
>>> the testsuite.
>>>
>>> But I'm still curious why some of those tests need this change. I
>>> think the ones I noted below are probably failing for some other
>>> reasons.
>>>
>> Just looked at 23_containers/span/back_assert_neg.cc, the linker says it needs
>> arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
>> ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char const*, int, char const*, char const*))
>> and indeed debug.o has a reference to __sync_synchronize
>
> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
> there are no dependencies on anything else in that file, including the
> _M_detach member function that uses atomics.
>
> This would also be solved by -Wl,--gc-sections :-)
>
> I think it would be better to move __glibcxx_assert_fail to a new
> file, so that it doesn't make every assertion unnecessarily depend on
> __sync_synchronize. I'll do that now.
>
> We could also make the atomics in debug.o conditional, so that debug
> mode doesn't depend on __sync_synchronize for single-threaded targets.
> Does the arm4t arch have pthreads support in newlib? I didn't bother
> making the use of atomics conditional, because performance is not
> really a priority for debug mode bookkeeping. But the problem here
> isn't just a slight performance overhead of atomics, it's that they
> aren't even supported for arm4t.
I might be wrong, but I don't think newlib has any support for pthreads.
R.
>
On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely <jwakely@redhat.com> wrote:
> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
> >
> >
> >
> > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >>
> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
> >> <christophe.lyon@linaro.org> wrote:
> >> >
> >> >
> >> >
> >> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >> >>
> >> >> On Sun, 10 Sept 2023 at 20:31, 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.
> >> >>
> >> >> Does this mean those features are unusable on the target, or just
> that
> >> >> users need to provide their own __sync_synchronize to use them?
> >> >
> >> >
> >> > IIUC the user is expected to provide them.
> >> > Looks like we discussed this in the past :-)
> >> > In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
> >> > see the pointer to Ramana's comment:
> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
> >>
> >> Oh yes, thanks for the reminder!
> >>
> >> >
> >> > The default arch for arm-eabi is armv4t which is very old.
> >> > When running the testsuite with something more recent (either as
> default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via
> dejagnu's target-board), the compiler generates barrier instructions and
> there are no such errors.
> >>
> >> Ah yes, that's fine then.
> >>
> >> > For instance, here is a log with the defaults:
> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
> >> > and a log when we target cortex-m0 which is still a very small cpu
> but has barriers:
> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
> >> >
> >> > I somehow wanted to get rid of such errors with the default
> configuration....
> >>
> >> Yep, that makes sense, and we'll still be testing them for newer
> >> arches on the target, so it's not completely disabling those parts of
> >> the testsuite.
> >>
> >> But I'm still curious why some of those tests need this change. I
> >> think the ones I noted below are probably failing for some other
> >> reasons.
> >>
> > Just looked at 23_containers/span/back_assert_neg.cc, the linker says
> it needs
> > arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
> > ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char
> const*, int, char const*, char const*))
> > and indeed debug.o has a reference to __sync_synchronize
>
> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
> there are no dependencies on anything else in that file, including the
> _M_detach member function that uses atomics.
>
indeed
> This would also be solved by -Wl,--gc-sections :-)
>
:-)
> I think it would be better to move __glibcxx_assert_fail to a new
> file, so that it doesn't make every assertion unnecessarily depend on
> __sync_synchronize. I'll do that now.
>
Sounds like a good idea, thanks.
> We could also make the atomics in debug.o conditional, so that debug
> mode doesn't depend on __sync_synchronize for single-threaded targets.
> Does the arm4t arch have pthreads support in newlib? I didn't bother
>
No ( grep _GLIBCXX_HAS_GTHREADS
$objdir/arm-eabi/libstdc++-v3/include/arm-eabi/bits/c++config returns:
/* #undef _GLIBCXX_HAS_GTHREADS */
making the use of atomics conditional, because performance is not
> really a priority for debug mode bookkeeping. But the problem here
> isn't just a slight performance overhead of atomics, it's that they
> aren't even supported for arm4t.
>
OK thanks.
So finally, this uncovered at least a "bug" that __glibcxx_assert_fail
should be in a dedicated object file :-)
I'll revisit my patch once you have moved __glibcxx_assert_fail
Thanks,
Christophe
On Mon, 11 Sept 2023 at 16:40, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
>
>
> On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
>> <christophe.lyon@linaro.org> wrote:
>> >
>> >
>> >
>> > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >>
>> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
>> >> <christophe.lyon@linaro.org> wrote:
>> >> >
>> >> >
>> >> >
>> >> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >> >>
>> >> >> On Sun, 10 Sept 2023 at 20:31, 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.
>> >> >>
>> >> >> Does this mean those features are unusable on the target, or just that
>> >> >> users need to provide their own __sync_synchronize to use them?
>> >> >
>> >> >
>> >> > IIUC the user is expected to provide them.
>> >> > Looks like we discussed this in the past :-)
>> >> > In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
>> >> > see the pointer to Ramana's comment: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
>> >>
>> >> Oh yes, thanks for the reminder!
>> >>
>> >> >
>> >> > The default arch for arm-eabi is armv4t which is very old.
>> >> > When running the testsuite with something more recent (either as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's target-board), the compiler generates barrier instructions and there are no such errors.
>> >>
>> >> Ah yes, that's fine then.
>> >>
>> >> > For instance, here is a log with the defaults:
>> >> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
>> >> > and a log when we target cortex-m0 which is still a very small cpu but has barriers:
>> >> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
>> >> >
>> >> > I somehow wanted to get rid of such errors with the default configuration....
>> >>
>> >> Yep, that makes sense, and we'll still be testing them for newer
>> >> arches on the target, so it's not completely disabling those parts of
>> >> the testsuite.
>> >>
>> >> But I'm still curious why some of those tests need this change. I
>> >> think the ones I noted below are probably failing for some other
>> >> reasons.
>> >>
>> > Just looked at 23_containers/span/back_assert_neg.cc, the linker says it needs
>> > arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
>> > ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char const*, int, char const*, char const*))
>> > and indeed debug.o has a reference to __sync_synchronize
>>
>> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
>> there are no dependencies on anything else in that file, including the
>> _M_detach member function that uses atomics.
>
> indeed
>
>
>>
>> This would also be solved by -Wl,--gc-sections :-)
>
> :-)
>
>>
>> I think it would be better to move __glibcxx_assert_fail to a new
>> file, so that it doesn't make every assertion unnecessarily depend on
>> __sync_synchronize. I'll do that now.
>
> Sounds like a good idea, thanks.
Done now at r14-3846-g4a2766ed00a479
>
>>
>> We could also make the atomics in debug.o conditional, so that debug
>> mode doesn't depend on __sync_synchronize for single-threaded targets.
>> Does the arm4t arch have pthreads support in newlib? I didn't bother
>
> No ( grep _GLIBCXX_HAS_GTHREADS $objdir/arm-eabi/libstdc++-v3/include/arm-eabi/bits/c++config returns:
> /* #undef _GLIBCXX_HAS_GTHREADS */
>
>> making the use of atomics conditional, because performance is not
>> really a priority for debug mode bookkeeping. But the problem here
>> isn't just a slight performance overhead of atomics, it's that they
>> aren't even supported for arm4t.
>
> OK thanks.
>
> So finally, this uncovered at least a "bug" that __glibcxx_assert_fail should be in a dedicated object file :-)
>
> I'll revisit my patch once you have moved __glibcxx_assert_fail
That's done (at r14-3845-gc7db9000fa7cac) and there should be no more
__sync_synchronize from src/c++11/debug.o at all now (at
r14-3846-g4a2766ed00a479). With that second change, it would have been
OK for __glibcxx_assert_fail to stay in that file, but it's not really
related so it's probably better for it to be in a separate file
anyway.
That should remove the need for most of your patch!
On Mon, 11 Sept 2023 at 18:11, Jonathan Wakely <jwakely@redhat.com> wrote:
> On Mon, 11 Sept 2023 at 16:40, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
> >
> >
> >
> > On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >>
> >> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
> >> <christophe.lyon@linaro.org> wrote:
> >> >
> >> >
> >> >
> >> > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >> >>
> >> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
> >> >> <christophe.lyon@linaro.org> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >> >> >>
> >> >> >> On Sun, 10 Sept 2023 at 20:31, 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.
> >> >> >>
> >> >> >> Does this mean those features are unusable on the target, or just
> that
> >> >> >> users need to provide their own __sync_synchronize to use them?
> >> >> >
> >> >> >
> >> >> > IIUC the user is expected to provide them.
> >> >> > Looks like we discussed this in the past :-)
> >> >> > In
> https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
> >> >> > see the pointer to Ramana's comment:
> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
> >> >>
> >> >> Oh yes, thanks for the reminder!
> >> >>
> >> >> >
> >> >> > The default arch for arm-eabi is armv4t which is very old.
> >> >> > When running the testsuite with something more recent (either as
> default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via
> dejagnu's target-board), the compiler generates barrier instructions and
> there are no such errors.
> >> >>
> >> >> Ah yes, that's fine then.
> >> >>
> >> >> > For instance, here is a log with the defaults:
> >> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
> >> >> > and a log when we target cortex-m0 which is still a very small cpu
> but has barriers:
> >> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
> >> >> >
> >> >> > I somehow wanted to get rid of such errors with the default
> configuration....
> >> >>
> >> >> Yep, that makes sense, and we'll still be testing them for newer
> >> >> arches on the target, so it's not completely disabling those parts of
> >> >> the testsuite.
> >> >>
> >> >> But I'm still curious why some of those tests need this change. I
> >> >> think the ones I noted below are probably failing for some other
> >> >> reasons.
> >> >>
> >> > Just looked at 23_containers/span/back_assert_neg.cc, the linker
> says it needs
> >> > arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
> >> > ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char
> const*, int, char const*, char const*))
> >> > and indeed debug.o has a reference to __sync_synchronize
> >>
> >> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
> >> there are no dependencies on anything else in that file, including the
> >> _M_detach member function that uses atomics.
> >
> > indeed
> >
> >
> >>
> >> This would also be solved by -Wl,--gc-sections :-)
> >
> > :-)
> >
> >>
> >> I think it would be better to move __glibcxx_assert_fail to a new
> >> file, so that it doesn't make every assertion unnecessarily depend on
> >> __sync_synchronize. I'll do that now.
> >
> > Sounds like a good idea, thanks.
>
> Done now at r14-3846-g4a2766ed00a479
> >
> >>
> >> We could also make the atomics in debug.o conditional, so that debug
> >> mode doesn't depend on __sync_synchronize for single-threaded targets.
> >> Does the arm4t arch have pthreads support in newlib? I didn't bother
> >
> > No ( grep _GLIBCXX_HAS_GTHREADS
> $objdir/arm-eabi/libstdc++-v3/include/arm-eabi/bits/c++config returns:
> > /* #undef _GLIBCXX_HAS_GTHREADS */
> >
> >> making the use of atomics conditional, because performance is not
> >> really a priority for debug mode bookkeeping. But the problem here
> >> isn't just a slight performance overhead of atomics, it's that they
> >> aren't even supported for arm4t.
> >
> > OK thanks.
> >
> > So finally, this uncovered at least a "bug" that __glibcxx_assert_fail
> should be in a dedicated object file :-)
> >
> > I'll revisit my patch once you have moved __glibcxx_assert_fail
>
> That's done (at r14-3845-gc7db9000fa7cac) and there should be no more
> __sync_synchronize from src/c++11/debug.o at all now (at
> r14-3846-g4a2766ed00a479). With that second change, it would have been
> OK for __glibcxx_assert_fail to stay in that file, but it's not really
> related so it's probably better for it to be in a separate file
> anyway.
>
> That should remove the need for most of your patch!
>
>
Hi!
I've looked at the remaining undefined references to __sync_synchronize
after your commits:
29_atomics/atomic/compare_exchange_padding.cc (from a.load())
29_atomics/atomic/cons/value_init.cc (from a.load())
29_atomics/atomic_float/value_init.cc (from a.load())
29_atomics/atomic_float/1.cc no problem (is_always_lock_free is false?)
29_atomics/atomic_integral/cons/value_init.cc (from a.load())
29_atomics/atomic_ref/compare_exchange_padding.cc (from a.store())
29_atomics/atomic_ref/generic.cc
29_atomics/atomic_ref/integral.cc
29_atomics/atomic_ref/pointer.cc
experimental/net/timer/waitable/dest.cc (from
_ZNSt12experimental3net2v110io_context9_M_do_oneENSt6chrono8durationIxSt5ratioILx1ELx1000EEEE)
experimental/net/timer/waitable/ops.cc not sure why?
experimental/polymorphic_allocator/construct_pair.cc (from load, line 835
of atomic_base.h)
I've noticed several undefined references
to __glibcxx_backtrace_create_state too
19_diagnostics/stacktrace/current.cc
19_diagnostics/stacktrace/entry.cc
19_diagnostics/stacktrace/stacktrace.cc
[...]
Thanks,
Christophe
On Tue, 12 Sept 2023 at 08:59, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
>
>
> On Mon, 11 Sept 2023 at 18:11, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On Mon, 11 Sept 2023 at 16:40, Christophe Lyon
>> <christophe.lyon@linaro.org> wrote:
>> >
>> >
>> >
>> > On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >>
>> >> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
>> >> <christophe.lyon@linaro.org> wrote:
>> >> >
>> >> >
>> >> >
>> >> > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >> >>
>> >> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
>> >> >> <christophe.lyon@linaro.org> wrote:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <jwakely@redhat.com> wrote:
>> >> >> >>
>> >> >> >> On Sun, 10 Sept 2023 at 20:31, 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.
>> >> >> >>
>> >> >> >> Does this mean those features are unusable on the target, or just that
>> >> >> >> users need to provide their own __sync_synchronize to use them?
>> >> >> >
>> >> >> >
>> >> >> > IIUC the user is expected to provide them.
>> >> >> > Looks like we discussed this in the past :-)
>> >> >> > In https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
>> >> >> > see the pointer to Ramana's comment: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
>> >> >>
>> >> >> Oh yes, thanks for the reminder!
>> >> >>
>> >> >> >
>> >> >> > The default arch for arm-eabi is armv4t which is very old.
>> >> >> > When running the testsuite with something more recent (either as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu via dejagnu's target-board), the compiler generates barrier instructions and there are no such errors.
>> >> >>
>> >> >> Ah yes, that's fine then.
>> >> >>
>> >> >> > For instance, here is a log with the defaults:
>> >> >> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
>> >> >> > and a log when we target cortex-m0 which is still a very small cpu but has barriers:
>> >> >> > https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
>> >> >> >
>> >> >> > I somehow wanted to get rid of such errors with the default configuration....
>> >> >>
>> >> >> Yep, that makes sense, and we'll still be testing them for newer
>> >> >> arches on the target, so it's not completely disabling those parts of
>> >> >> the testsuite.
>> >> >>
>> >> >> But I'm still curious why some of those tests need this change. I
>> >> >> think the ones I noted below are probably failing for some other
>> >> >> reasons.
>> >> >>
>> >> > Just looked at 23_containers/span/back_assert_neg.cc, the linker says it needs
>> >> > arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
>> >> > ./back_assert_neg-back_assert_neg.o (std::__glibcxx_assert_fail(char const*, int, char const*, char const*))
>> >> > and indeed debug.o has a reference to __sync_synchronize
>> >>
>> >> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
>> >> there are no dependencies on anything else in that file, including the
>> >> _M_detach member function that uses atomics.
>> >
>> > indeed
>> >
>> >
>> >>
>> >> This would also be solved by -Wl,--gc-sections :-)
>> >
>> > :-)
>> >
>> >>
>> >> I think it would be better to move __glibcxx_assert_fail to a new
>> >> file, so that it doesn't make every assertion unnecessarily depend on
>> >> __sync_synchronize. I'll do that now.
>> >
>> > Sounds like a good idea, thanks.
>>
>> Done now at r14-3846-g4a2766ed00a479
>> >
>> >>
>> >> We could also make the atomics in debug.o conditional, so that debug
>> >> mode doesn't depend on __sync_synchronize for single-threaded targets.
>> >> Does the arm4t arch have pthreads support in newlib? I didn't bother
>> >
>> > No ( grep _GLIBCXX_HAS_GTHREADS $objdir/arm-eabi/libstdc++-v3/include/arm-eabi/bits/c++config returns:
>> > /* #undef _GLIBCXX_HAS_GTHREADS */
>> >
>> >> making the use of atomics conditional, because performance is not
>> >> really a priority for debug mode bookkeeping. But the problem here
>> >> isn't just a slight performance overhead of atomics, it's that they
>> >> aren't even supported for arm4t.
>> >
>> > OK thanks.
>> >
>> > So finally, this uncovered at least a "bug" that __glibcxx_assert_fail should be in a dedicated object file :-)
>> >
>> > I'll revisit my patch once you have moved __glibcxx_assert_fail
>>
>> That's done (at r14-3845-gc7db9000fa7cac) and there should be no more
>> __sync_synchronize from src/c++11/debug.o at all now (at
>> r14-3846-g4a2766ed00a479). With that second change, it would have been
>> OK for __glibcxx_assert_fail to stay in that file, but it's not really
>> related so it's probably better for it to be in a separate file
>> anyway.
>>
>> That should remove the need for most of your patch!
>>
>
> Hi!
>
> I've looked at the remaining undefined references to __sync_synchronize after your commits:
> 29_atomics/atomic/compare_exchange_padding.cc (from a.load())
> 29_atomics/atomic/cons/value_init.cc (from a.load())
> 29_atomics/atomic_float/value_init.cc (from a.load())
> 29_atomics/atomic_float/1.cc no problem (is_always_lock_free is false?)
> 29_atomics/atomic_integral/cons/value_init.cc (from a.load())
> 29_atomics/atomic_ref/compare_exchange_padding.cc (from a.store())
> 29_atomics/atomic_ref/generic.cc
> 29_atomics/atomic_ref/integral.cc
> 29_atomics/atomic_ref/pointer.cc
These all make sense.
> experimental/net/timer/waitable/dest.cc (from _ZNSt12experimental3net2v110io_context9_M_do_oneENSt6chrono8durationIxSt5ratioILx1ELx1000EEEE)
> experimental/net/timer/waitable/ops.cc not sure why?
I think we can make those uses of atomics conditional like this
--- a/libstdc++-v3/include/experimental/io_context
+++ b/libstdc++-v3/include/experimental/io_context
@@ -562,7 +562,11 @@ inline namespace v1
}
};
+#ifdef _GLIBCXX_HAS_GTHREADS
atomic<count_type> _M_work_count;
+#else
+ count_type _M_work_count;
+#endif
mutable execution_context::mutex_type _M_mtx;
queue<function<void()>> _M_op;
bool _M_stopped = false;
> experimental/polymorphic_allocator/construct_pair.cc (from load, line 835 of atomic_base.h)
Curious. This comes from lines 168 and 173 in src/c++17/memory_resource.cc
The logic there is:
#if ATOMIC_POINTER_LOCK_FREE == 2
using atomic_mem_res = atomic<memory_resource*>;
#elif defined(_GLIBCXX_HAS_GTHREADS)
// Emulate the interface of std::atomic but using a mutex.
struct atomic_mem_res {
memory_resource* load(memory_order);
memory_resource* exchange(memory_resource*, memory_order);
};
#else
// Emulate the interface of std::atomic with no atomicity or
synchronization.
struct atomic_mem_res {
memory_resource* load(memory_order);
memory_resource* exchange(memory_resource*, memory_order);
};
#endif
So we use an atomic<T*> if that's always lock free, even for
single-threaded. It didn't occur to me that a target would have
lock-free pointer-size atomics, but trying to use them would give a
linker error.
Maybe it should be:
#ifndef _GLIBCXX_HAS_GTHREADS
// single-threaded struct atomic_mem_res
#elif ATOMIC_POINTER_LOCK_FREE == 2
using atomic_mem_res = atomic<memory_resource*>;
#else
// mutex-based struct atomic_mem_res
#endif
> I've noticed several undefined references to __glibcxx_backtrace_create_state too
> 19_diagnostics/stacktrace/current.cc
> 19_diagnostics/stacktrace/entry.cc
> 19_diagnostics/stacktrace/stacktrace.cc
Odd. These were changed in r14-3812-gb96b554592c5cb to link to
libstdc++exp.a instead of libstdc++_libbacktrace.a, and
__glibcxx_backtrace_create_state should be part of libstdc++exp.a now.
If the target doesn't support libbacktrace then the symbols will be
missing from libstdc++exp.a, but then the test should fail to match
the effective target "stacktrace".
On Tue, 12 Sept 2023 at 11:07, Jonathan Wakely <jwakely@redhat.com> wrote:
> On Tue, 12 Sept 2023 at 08:59, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
> >
> >
> >
> > On Mon, 11 Sept 2023 at 18:11, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >>
> >> On Mon, 11 Sept 2023 at 16:40, Christophe Lyon
> >> <christophe.lyon@linaro.org> wrote:
> >> >
> >> >
> >> >
> >> > On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >> >>
> >> >> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon
> >> >> <christophe.lyon@linaro.org> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >> >> >>
> >> >> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon
> >> >> >> <christophe.lyon@linaro.org> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely <
> jwakely@redhat.com> wrote:
> >> >> >> >>
> >> >> >> >> On Sun, 10 Sept 2023 at 20:31, 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.
> >> >> >> >>
> >> >> >> >> Does this mean those features are unusable on the target, or
> just that
> >> >> >> >> users need to provide their own __sync_synchronize to use them?
> >> >> >> >
> >> >> >> >
> >> >> >> > IIUC the user is expected to provide them.
> >> >> >> > Looks like we discussed this in the past :-)
> >> >> >> > In
> https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01632.html,
> >> >> >> > see the pointer to Ramana's comment:
> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02751.html
> >> >> >>
> >> >> >> Oh yes, thanks for the reminder!
> >> >> >>
> >> >> >> >
> >> >> >> > The default arch for arm-eabi is armv4t which is very old.
> >> >> >> > When running the testsuite with something more recent (either
> as default by configuring GCC --with-arch=XXX or by forcing -march/-mcpu
> via dejagnu's target-board), the compiler generates barrier instructions
> and there are no such errors.
> >> >> >>
> >> >> >> Ah yes, that's fine then.
> >> >> >>
> >> >> >> > For instance, here is a log with the defaults:
> >> >> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-arm_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-arm_eabi
> >> >> >> > and a log when we target cortex-m0 which is still a very small
> cpu but has barriers:
> >> >> >> >
> https://git.linaro.org/toolchain/ci/base-artifacts/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi.git/tree/00-sumfiles?h=linaro-local/ci/tcwg_gnu_embed_check_gcc/master-thumb_m0_eabi
> >> >> >> >
> >> >> >> > I somehow wanted to get rid of such errors with the default
> configuration....
> >> >> >>
> >> >> >> Yep, that makes sense, and we'll still be testing them for newer
> >> >> >> arches on the target, so it's not completely disabling those
> parts of
> >> >> >> the testsuite.
> >> >> >>
> >> >> >> But I'm still curious why some of those tests need this change. I
> >> >> >> think the ones I noted below are probably failing for some other
> >> >> >> reasons.
> >> >> >>
> >> >> > Just looked at 23_containers/span/back_assert_neg.cc, the linker
> says it needs
> >> >> > arm-eabi/libstdc++-v3/src/.libs/libstdc++.a(debug.o) to resolve
> >> >> > ./back_assert_neg-back_assert_neg.o
> (std::__glibcxx_assert_fail(char const*, int, char const*, char const*))
> >> >> > and indeed debug.o has a reference to __sync_synchronize
> >> >>
> >> >> Aha, that's just because I put __glibcxx_assert_fail in debug.o, but
> >> >> there are no dependencies on anything else in that file, including
> the
> >> >> _M_detach member function that uses atomics.
> >> >
> >> > indeed
> >> >
> >> >
> >> >>
> >> >> This would also be solved by -Wl,--gc-sections :-)
> >> >
> >> > :-)
> >> >
> >> >>
> >> >> I think it would be better to move __glibcxx_assert_fail to a new
> >> >> file, so that it doesn't make every assertion unnecessarily depend on
> >> >> __sync_synchronize. I'll do that now.
> >> >
> >> > Sounds like a good idea, thanks.
> >>
> >> Done now at r14-3846-g4a2766ed00a479
> >> >
> >> >>
> >> >> We could also make the atomics in debug.o conditional, so that debug
> >> >> mode doesn't depend on __sync_synchronize for single-threaded
> targets.
> >> >> Does the arm4t arch have pthreads support in newlib? I didn't bother
> >> >
> >> > No ( grep _GLIBCXX_HAS_GTHREADS
> $objdir/arm-eabi/libstdc++-v3/include/arm-eabi/bits/c++config returns:
> >> > /* #undef _GLIBCXX_HAS_GTHREADS */
> >> >
> >> >> making the use of atomics conditional, because performance is not
> >> >> really a priority for debug mode bookkeeping. But the problem here
> >> >> isn't just a slight performance overhead of atomics, it's that they
> >> >> aren't even supported for arm4t.
> >> >
> >> > OK thanks.
> >> >
> >> > So finally, this uncovered at least a "bug" that
> __glibcxx_assert_fail should be in a dedicated object file :-)
> >> >
> >> > I'll revisit my patch once you have moved __glibcxx_assert_fail
> >>
> >> That's done (at r14-3845-gc7db9000fa7cac) and there should be no more
> >> __sync_synchronize from src/c++11/debug.o at all now (at
> >> r14-3846-g4a2766ed00a479). With that second change, it would have been
> >> OK for __glibcxx_assert_fail to stay in that file, but it's not really
> >> related so it's probably better for it to be in a separate file
> >> anyway.
> >>
> >> That should remove the need for most of your patch!
> >>
> >
> > Hi!
> >
> > I've looked at the remaining undefined references to __sync_synchronize
> after your commits:
> > 29_atomics/atomic/compare_exchange_padding.cc (from a.load())
> > 29_atomics/atomic/cons/value_init.cc (from a.load())
> > 29_atomics/atomic_float/value_init.cc (from a.load())
> > 29_atomics/atomic_float/1.cc no problem (is_always_lock_free is false?)
> > 29_atomics/atomic_integral/cons/value_init.cc (from a.load())
> > 29_atomics/atomic_ref/compare_exchange_padding.cc (from a.store())
> > 29_atomics/atomic_ref/generic.cc
> > 29_atomics/atomic_ref/integral.cc
> > 29_atomics/atomic_ref/pointer.cc
>
> These all make sense.
>
> > experimental/net/timer/waitable/dest.cc (from
> _ZNSt12experimental3net2v110io_context9_M_do_oneENSt6chrono8durationIxSt5ratioILx1ELx1000EEEE)
> > experimental/net/timer/waitable/ops.cc not sure why?
>
> I think we can make those uses of atomics conditional like this
>
> --- a/libstdc++-v3/include/experimental/io_context
> +++ b/libstdc++-v3/include/experimental/io_context
> @@ -562,7 +562,11 @@ inline namespace v1
> }
> };
>
> +#ifdef _GLIBCXX_HAS_GTHREADS
> atomic<count_type> _M_work_count;
> +#else
> + count_type _M_work_count;
> +#endif
> mutable execution_context::mutex_type _M_mtx;
> queue<function<void()>> _M_op;
> bool _M_stopped = false;
>
>
>
>
> > experimental/polymorphic_allocator/construct_pair.cc (from load, line
> 835 of atomic_base.h)
>
> Curious. This comes from lines 168 and 173 in src/c++17/memory_resource.cc
> The logic there is:
>
> #if ATOMIC_POINTER_LOCK_FREE == 2
> using atomic_mem_res = atomic<memory_resource*>;
> #elif defined(_GLIBCXX_HAS_GTHREADS)
> // Emulate the interface of std::atomic but using a mutex.
> struct atomic_mem_res {
> memory_resource* load(memory_order);
> memory_resource* exchange(memory_resource*, memory_order);
> };
> #else
> // Emulate the interface of std::atomic with no atomicity or
> synchronization.
> struct atomic_mem_res {
> memory_resource* load(memory_order);
> memory_resource* exchange(memory_resource*, memory_order);
> };
> #endif
>
> So we use an atomic<T*> if that's always lock free, even for
> single-threaded. It didn't occur to me that a target would have
> lock-free pointer-size atomics, but trying to use them would give a
> linker error.
>
> Maybe it should be:
>
> #ifndef _GLIBCXX_HAS_GTHREADS
> // single-threaded struct atomic_mem_res
> #elif ATOMIC_POINTER_LOCK_FREE == 2
> using atomic_mem_res = atomic<memory_resource*>;
> #else
> // mutex-based struct atomic_mem_res
> #endif
>
> > I've noticed several undefined references to
> __glibcxx_backtrace_create_state too
> > 19_diagnostics/stacktrace/current.cc
> > 19_diagnostics/stacktrace/entry.cc
> > 19_diagnostics/stacktrace/stacktrace.cc
>
> Odd. These were changed in r14-3812-gb96b554592c5cb to link to
> libstdc++exp.a instead of libstdc++_libbacktrace.a, and
> __glibcxx_backtrace_create_state should be part of libstdc++exp.a now.
> If the target doesn't support libbacktrace then the symbols will be
> missing from libstdc++exp.a, but then the test should fail to match
> the effective target "stacktrace".
>
> Strange, it looks like these libs were not correctly rebuilt after I
rebased to have your patches.
I've rebuilt from scratch and these undefined references are not present
indeed.
Thanks,
Christophe
On Wed, 13 Sept 2023 at 16:38, Christophe Lyon via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> On Tue, 12 Sept 2023 at 11:07, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> > On Tue, 12 Sept 2023 at 08:59, Christophe Lyon
> > <christophe.lyon@linaro.org> wrote:
> > > I've noticed several undefined references to
> > __glibcxx_backtrace_create_state too
> > > 19_diagnostics/stacktrace/current.cc
> > > 19_diagnostics/stacktrace/entry.cc
> > > 19_diagnostics/stacktrace/stacktrace.cc
> >
> > Odd. These were changed in r14-3812-gb96b554592c5cb to link to
> > libstdc++exp.a instead of libstdc++_libbacktrace.a, and
> > __glibcxx_backtrace_create_state should be part of libstdc++exp.a now.
> > If the target doesn't support libbacktrace then the symbols will be
> > missing from libstdc++exp.a, but then the test should fail to match
> > the effective target "stacktrace".
> >
> > Strange, it looks like these libs were not correctly rebuilt after I
> rebased to have your patches.
> I've rebuilt from scratch and these undefined references are not present
> indeed.
Great! Thanks for checking.
I sent a proposed patch that should remove most of the other
unnecessary uses of atomics, as suggested yesterday:
https://patchwork.sourceware.org/project/gcc/patch/20230913123226.2083892-1-jwakely@redhat.com/
Would you be able to check whether that improves the results further for arm4t?
I think with that, you should only need the dg-require-thread-fence
for the 9 or so tests under 29_atomics/ which really do require atomic
synchronization.
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { target c++2a } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <string>
#include <debug/string>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#define _GLIBCXX_DEBUG_PEDANTIC
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#define _GLIBCXX_DEBUG_PEDANTIC
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#define _GLIBCXX_DEBUG_PEDANTIC
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#define _GLIBCXX_DEBUG_PEDANTIC
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++17 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/string>
#include <memory_resource>
@@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
// Copyright (C) 2009-2023 Free Software Foundation, Inc.
//
@@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-cstdint "" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
@@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-cstdint "" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
@@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-cstdint "" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/string>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -17,6 +17,7 @@
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++14 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <array>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <deque>
#include <debug/deque>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <testsuite_hooks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <testsuite_hooks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <testsuite_hooks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/deque>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <forward_list>
#include <debug/forward_list>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/forward_list>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/forward_list>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/forward_list>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <list>
#include <debug/list>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/list>
#include <iterator>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <iterator>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
@@ -17,6 +17,7 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <map>
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <iterator>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <iterator>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <set>
#include <debug/set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <debug/checks.h>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <iterator>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <iterator>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/set>
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -1,6 +1,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_DEBUG
#define _GLIBCXX_DEBUG
@@ -1,6 +1,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_DEBUG
#define _GLIBCXX_DEBUG
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#undef _GLIBCXX_ASSERTIONS
#define _GLIBCXX_ASSERTIONS
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_map>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <unordered_set>
#include <debug/unordered_set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
#include <testsuite_allocator.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/unordered_set>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <vector>
#include <debug/vector>
@@ -1,6 +1,7 @@
// { dg-do run { xfail *-*-* } }
// { dg-options "-D_GLIBCXX_DEBUG_BACKTRACE -lstdc++_libbacktrace" }
// { dg-require-effective-target stacktrace }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <debug/checks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <vector>
#include <debug/vector>
@@ -18,6 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <memory>
#include <iterator>
@@ -19,6 +19,7 @@
// We need to be pedantic about reallocations for this testcase to be correct.
// { dg-options "-D_GLIBCXX_DEBUG_PEDANTIC" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#ifndef _GLIBCXX_DEBUG_PEDANTIC
# define _GLIBCXX_DEBUG_PEDANTIC 1
@@ -19,6 +19,7 @@
// We need to be pedantic about reallocations for this testcase to be correct.
// { dg-options "-D_GLIBCXX_DEBUG_PEDANTIC" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#ifndef _GLIBCXX_DEBUG_PEDANTIC
# define _GLIBCXX_DEBUG_PEDANTIC 1
@@ -19,6 +19,7 @@
// We need to be pedantic about reallocations for this testcase to be correct.
// { dg-options "-D_GLIBCXX_DEBUG_PEDANTIC" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#ifndef _GLIBCXX_DEBUG_PEDANTIC
# define _GLIBCXX_DEBUG_PEDANTIC 1
@@ -19,6 +19,7 @@
// We need to be pedantic about reallocations for this testcase to be correct.
// { dg-options "-D_GLIBCXX_DEBUG_PEDANTIC" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#ifndef _GLIBCXX_DEBUG_PEDANTIC
# define _GLIBCXX_DEBUG_PEDANTIC 1
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
@@ -15,6 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <set>
#include <debug/vector>
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
#include <iterator>
@@ -18,6 +18,7 @@
// Requires C++11 because we check for correct output of
// __gnu_cxx::__normal_iterator which is improved in this mode.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a -D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
// { dg-require-effective-target c++2a }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <iterator>
#include <testsuite_iterators.h>
@@ -18,6 +18,7 @@
// Requires C++11 because we check for correct output of
// std::reverse_iterator which is improved only in this mode.
// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <debug/vector>
@@ -18,6 +18,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run { target c++11 } }
// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <functional>
@@ -18,6 +18,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run }
// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <vector>
@@ -17,6 +17,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <set>
@@ -18,6 +18,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run { target c++11 } }
// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <functional>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++17 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <debug/vector>
@@ -18,6 +18,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run { target c++11 } }
// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <functional>
@@ -17,6 +17,7 @@
// { dg-do run { target c++17 } }
// { dg-require-cstdint "" }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#ifndef _GLIBCXX_ASSERTIONS
// Make std::uniform_int_distribution check its parameters
@@ -18,6 +18,7 @@
// { dg-options "-D_GLIBCXX_DEBUG" }
// { dg-do run { target c++11 } }
// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <algorithm>
#include <functional>
@@ -18,6 +18,7 @@
// { dg-options "-std=gnu++2a -D_GLIBCXX_ASSERTIONS" }
// { dg-do run { target c++2a } }
// { dg-xfail-run-if "__glibcxx_assert in bit_ceil should fail" { *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <bit>
#include <limits>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run { xfail *-*-* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
@@ -1,5 +1,6 @@
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
// { dg-do run }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <valarray>
#include <testsuite_hooks.h>
@@ -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>
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++2a" }
// { dg-do run { target c++2a } }
+// { dg-require-thread-fence "" }
#include <atomic>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -18,6 +18,7 @@
// { dg-do run { target c++14 } }
// { dg-add-options libatomic }
// { dg-xfail-if "poll not available" { *-*-rtems* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <experimental/timer>
#include <testsuite_hooks.h>
@@ -18,6 +18,7 @@
// { dg-do run { target c++14 } }
// { dg-add-options libatomic }
// { dg-xfail-if "poll not available" { *-*-rtems* } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <experimental/timer>
#include <testsuite_hooks.h>
@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } }
+// { dg-require-thread-fence "" } // needed by __gnu_debug::_Safe_sequence_base::_M_detach_all()
#include <experimental/memory_resource>
#include <utility>