public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options
@ 2023-09-11 16:16 Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 01/13] " Jonathan Wakely
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

This patch series replicates the behaviour of the g++ testsuite, so that
libstdc++ tests can easily be run for multiple different -std options in
a single testsuite run.  As described in the updated docs, the -std
options to use for every test can be overridden by setting v3_std_list
in ~/.dejagnurc or $DEJAGNU, or setting $GLIBCXX_TESTSUITE_STDS in the
environment.  If not overridden, the default is just to run with
-std=gnu++17 (so that we don't increase the time taken for a full
testsuite run).

Tests that require a newer standard than C++17 will default to that
newer standard and C++26, so e.g. std::format tests will be run with
both -std=gnu++20 and -std=gnu++26.  This does increase the number of
tests, but only for the subset of tests for C++20/23/26 features.  If
this is too costly for testers, we can change that (this might be
needed, because the C++20 tests for std::ranges and std::format are
particularly slow to compile).

Because a correct default will be chosen for tests that require
something newer than C++17, we no longer need dg-options "-std=gnu++20"
or similar in any tests.  Removing the explicit -std option allows the
test to be run for later standards via the v3_std_list settings, so that
we can verify that C++20 features still work in C++23 and C++26, for
example.  This change already found some tests which failed when run
with a later standard (see r14-3771-gf12e26f3496275).

Patches 2-13 in the series remove those unnecessary dg-options from
about half the relevant tests, but there are more than 500 others that
still need adjusting.

We can remove files like testsuite/std/format/functions/format_c++23.cc
which only exist to duplicate existing tests with a different -std
option.  We can remove that file now, and rely on format.cc being run
with multiple -std options by libstdc++ maintainers.

It might also be useful to add a 'make check-quick' target which runs a
small subset of smoke tests with every standard version in v3_std_list.
This would be a suitable target for CI bots and for packagers who want
to verify that a build of GCC is functional, without running the entire
libstdc++ testsuite.

Any comments or suggestions?

-- >8 --

Jonathan Wakely (13):
  libstdc++: Add support for running tests with multiple -std options
  libstdc++: Replace dg-options "-std=c++11" with dg-add-options
    strict_std
  libstdc++: Replace dg-options "-std=c++17" with dg-add-options
    strict_std
  libstdc++: Replace dg-options "-std=c++20" with dg-add-options
    strict_std
  libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar>
    tests
  libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and
    <ranges> tests
  libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo
    tests
  libstdc++: Remove dg-options "-std=gnu++20" from std::format tests
  libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests
  libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests
  libstdc++: Remove dg-options "-std=gnu++23" from remaining tests
  libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests
  libstdc++: Simplify dejagnu directives for some tests using threads

 libstdc++-v3/doc/html/manual/test.html        |  46 +++++---
 libstdc++-v3/doc/xml/manual/test.xml          |  52 ++++++---
 .../headers/limits/synopsis_cxx23.cc          |   1 -
 .../18_support/headers/stdfloat/types_std.cc  |   1 -
 .../18_support/type_info/constexpr.cc         |   2 +-
 .../19_diagnostics/stacktrace/current.cc      |   2 +-
 .../19_diagnostics/stacktrace/entry.cc        |   2 +-
 .../19_diagnostics/stacktrace/stacktrace.cc   |   2 +-
 .../19_diagnostics/stacktrace/synopsis.cc     |   1 -
 .../19_diagnostics/stacktrace/version.cc      |   1 -
 .../20_util/aligned_storage/deprecated-2b.cc  |   1 -
 .../20_util/aligned_union/deprecated-2b.cc    |   1 -
 .../20_util/bitset/access/constexpr.cc        |   1 -
 .../20_util/bitset/cons/constexpr_c++23.cc    |   1 -
 .../20_util/bitset/count/constexpr.cc         |   1 -
 .../testsuite/20_util/bitset/ext/constexpr.cc |   1 -
 .../bitset/operations/constexpr_c++23.cc      |   1 -
 .../testsuite/20_util/bitset/version.cc       |   1 -
 .../duration/arithmetic/overflow_c++20.cc     |   1 -
 libstdc++-v3/testsuite/20_util/duration/io.cc |   1 -
 .../testsuite/20_util/expected/assign.cc      |   1 -
 .../testsuite/20_util/expected/bad.cc         |   1 -
 .../testsuite/20_util/expected/cons.cc        |   1 -
 .../testsuite/20_util/expected/equality.cc    |   1 -
 .../20_util/expected/illformed_neg.cc         |   1 -
 .../testsuite/20_util/expected/lwg3877.cc     |   1 -
 .../testsuite/20_util/expected/lwg3938.cc     |   1 -
 .../testsuite/20_util/expected/monadic.cc     |   1 -
 .../testsuite/20_util/expected/observers.cc   |   1 -
 .../20_util/expected/requirements.cc          |   1 -
 .../testsuite/20_util/expected/swap.cc        |   1 -
 .../testsuite/20_util/expected/synopsis.cc    |   1 -
 .../testsuite/20_util/expected/unexpected.cc  |   1 -
 .../testsuite/20_util/expected/version.cc     |   1 -
 .../testsuite/20_util/from_chars/8.cc         |   1 -
 .../testsuite/20_util/from_chars/constexpr.cc |   1 -
 .../20_util/function/cons/deduction_c++23.cc  |   1 -
 .../20_util/function_objects/invoke/4.cc      |   1 -
 .../function_objects/invoke/dangling_ref.cc   |   1 -
 .../function_objects/range.cmp/equal_to.cc    |   3 +-
 .../function_objects/range.cmp/greater.cc     |   3 +-
 .../range.cmp/greater_equal.cc                |   3 +-
 .../function_objects/range.cmp/less.cc        |   3 +-
 .../function_objects/range.cmp/less_equal.cc  |   3 +-
 .../function_objects/range.cmp/lwg3530.cc     |   1 -
 .../range.cmp/not_equal_to.cc                 |   3 +-
 .../testsuite/20_util/is_scoped_enum/value.cc |   1 -
 .../20_util/is_scoped_enum/version.cc         |   1 -
 .../20_util/move_only_function/call.cc        |   1 -
 .../20_util/move_only_function/cons.cc        |   1 -
 .../20_util/move_only_function/move.cc        |   1 -
 .../20_util/move_only_function/version.cc     |   1 -
 .../20_util/optional/monadic/and_then.cc      |   1 -
 .../20_util/optional/monadic/or_else.cc       |   1 -
 .../20_util/optional/monadic/or_else_neg.cc   |   1 -
 .../20_util/optional/monadic/pr109242.cc      |   1 -
 .../20_util/optional/monadic/transform.cc     |   1 -
 .../testsuite/20_util/pair/p2321r2.cc         |   1 -
 .../20_util/reference_from_temporary/value.cc |   1 -
 .../reference_from_temporary/value2.cc        |   1 -
 .../reference_from_temporary/version.cc       |   1 -
 .../testsuite/20_util/shared_ptr/atomic/3.cc  |   3 +-
 .../shared_ptr/thread/default_weaktoshared.cc |   3 +-
 .../shared_ptr/thread/mutex_weaktoshared.cc   |   3 +-
 .../specialized_algorithms/construct_at/1.cc  |   3 +-
 .../construct_at/92878_92947.cc               |   3 +-
 .../construct_at/95788.cc                     |   3 +-
 .../destroy/constrained.cc                    |   3 +-
 .../uninitialized_copy/constrained.cc         |   3 +-
 .../constrained.cc                            |   3 +-
 .../uninitialized_fill/94017.cc               |   3 +-
 .../uninitialized_fill/constrained.cc         |   3 +-
 .../uninitialized_fill_n/94017.cc             |   3 +-
 .../uninitialized_move/constrained.cc         |   3 +-
 .../constrained.cc                            |   3 +-
 .../synchronized_pool_resource/allocate.cc    |   6 +-
 .../allocate_single.cc                        |   3 +-
 .../synchronized_pool_resource/cons.cc        |   6 +-
 .../synchronized_pool_resource/cons_single.cc |   3 +-
 .../synchronized_pool_resource/is_equal.cc    |   6 +-
 .../multithreaded.cc                          |   6 +-
 .../synchronized_pool_resource/options.cc     |   6 +-
 .../synchronized_pool_resource/release.cc     |   6 +-
 .../release_single.cc                         |   3 +-
 .../testsuite/20_util/to_chars/constexpr.cc   |   1 -
 .../20_util/to_chars/float128_c++23.cc        |   1 -
 .../20_util/to_chars/float16_c++23.cc         |   1 -
 .../testsuite/20_util/to_chars/version.cc     |   1 -
 .../testsuite/20_util/to_underlying/1.cc      |   1 -
 .../20_util/to_underlying/version.cc          |   1 -
 .../testsuite/20_util/tuple/p2321r2.cc        |   1 -
 .../20_util/unique_ptr/assign/constexpr.cc    |   1 -
 .../unique_ptr/comparison/constexpr.cc        |   1 -
 .../unique_ptr/cons/constexpr_c++20.cc        |   1 -
 .../20_util/unique_ptr/creation/constexpr.cc  |   1 -
 .../20_util/unique_ptr/modifiers/constexpr.cc |   1 -
 .../specialized_algorithms/constexpr.cc       |   1 -
 .../testsuite/20_util/unreachable/1.cc        |   1 -
 .../testsuite/20_util/unreachable/version.cc  |   1 -
 .../20_util/uses_allocator/lwg3677.cc         |   1 -
 .../capacity/char/resize_and_overwrite.cc     |   1 -
 .../basic_string/operations/contains/char.cc  |   1 -
 .../operations/contains/nonnull.cc            |   2 +-
 .../operations/contains/wchar_t.cc            |   1 -
 .../cons/char/range_c++20.cc                  |   1 -
 .../cons/wchar_t/range_c++20.cc               |   1 -
 .../operations/contains/char.cc               |   1 -
 .../operations/contains/char/2.cc             |   1 -
 .../operations/contains/nonnull.cc            |   2 +-
 .../operations/contains/wchar_t.cc            |   1 -
 .../headers/cuchar/functions_std_cxx20.cc     |   1 -
 .../23_containers/deque/48101-2_neg.cc        |   4 +-
 .../23_containers/forward_list/48101-2_neg.cc |   4 +-
 .../23_containers/list/48101-2_neg.cc         |   4 +-
 .../23_containers/map/48101-2_neg.cc          |   4 +-
 .../testsuite/23_containers/map/48101_neg.cc  |   3 +-
 .../23_containers/multimap/48101-2_neg.cc     |   4 +-
 .../23_containers/multimap/48101_neg.cc       |   3 +-
 .../23_containers/multiset/48101-2_neg.cc     |   4 +-
 .../23_containers/queue/cons_from_iters.cc    |   1 -
 .../23_containers/set/48101-2_neg.cc          |   4 +-
 .../23_containers/span/back_assert_neg.cc     |   5 +-
 .../testsuite/23_containers/span/back_neg.cc  |   3 +-
 .../23_containers/span/cons_1_assert_neg.cc   |   5 +-
 .../23_containers/span/cons_2_assert_neg.cc   |   5 +-
 .../span/contiguous_range_neg.cc              |   3 +-
 .../23_containers/span/everything.cc          |   3 +-
 .../23_containers/span/first_2_assert_neg.cc  |   5 +-
 .../23_containers/span/first_assert_neg.cc    |   5 +-
 .../testsuite/23_containers/span/first_neg.cc |   3 +-
 .../23_containers/span/front_assert_neg.cc    |   5 +-
 .../testsuite/23_containers/span/front_neg.cc |   3 +-
 .../23_containers/span/index_op_assert_neg.cc |   5 +-
 .../23_containers/span/index_op_neg.cc        |   3 +-
 .../23_containers/span/last_2_assert_neg.cc   |   5 +-
 .../23_containers/span/last_assert_neg.cc     |   5 +-
 .../testsuite/23_containers/span/last_neg.cc  |   3 +-
 .../span/subspan_2_assert_neg.cc              |   5 +-
 .../span/subspan_3_assert_neg.cc              |   5 +-
 .../span/subspan_4_assert_neg.cc              |   5 +-
 .../span/subspan_5_assert_neg.cc              |   5 +-
 .../span/subspan_6_assert_neg.cc              |   5 +-
 .../23_containers/span/subspan_assert_neg.cc  |   5 +-
 .../23_containers/span/subspan_neg.cc         |   3 +-
 .../23_containers/stack/cons_from_iters.cc    |   1 -
 .../unordered_map/48101-2_neg.cc              |   4 +-
 .../unordered_multimap/48101-2_neg.cc         |   4 +-
 .../unordered_multiset/48101-2_neg.cc         |   4 +-
 .../unordered_set/48101-2_neg.cc              |   4 +-
 .../23_containers/vector/48101-2_neg.cc       |   4 +-
 .../vector/bool/element_access/1.cc           |   1 -
 .../24_iterators/const_iterator/1.cc          |   1 -
 .../range_operations/advance_debug_neg.cc     |   5 +-
 .../24_iterators/reverse_iterator/100639.cc   |   4 +-
 .../25_algorithms/adjacent_find/constexpr.cc  |   3 +-
 .../adjacent_find/constrained.cc              |   3 +-
 .../25_algorithms/all_of/constexpr.cc         |   3 +-
 .../25_algorithms/all_of/constrained.cc       |   3 +-
 .../25_algorithms/any_of/constexpr.cc         |   3 +-
 .../25_algorithms/any_of/constrained.cc       |   3 +-
 .../25_algorithms/binary_search/constexpr.cc  |   3 +-
 .../binary_search/constrained.cc              |   3 +-
 .../25_algorithms/clamp/constrained.cc        |   3 +-
 .../25_algorithms/constexpr_macro.cc          |   3 +-
 .../testsuite/25_algorithms/contains/1.cc     |   1 -
 .../25_algorithms/contains_subrange/1.cc      |   1 -
 .../testsuite/25_algorithms/copy/95578.cc     |   3 +-
 .../testsuite/25_algorithms/copy/constexpr.cc |   3 +-
 .../25_algorithms/copy/constrained.cc         |   3 +-
 .../25_algorithms/copy/debug/constexpr_neg.cc |   3 +-
 .../25_algorithms/copy_backward/95578.cc      |   3 +-
 .../25_algorithms/copy_backward/constexpr.cc  |   3 +-
 .../copy_backward/constrained.cc              |   3 +-
 .../copy_backward/debug/constexpr_neg.cc      |   3 +-
 .../25_algorithms/copy_if/constexpr.cc        |   3 +-
 .../25_algorithms/copy_if/constrained.cc      |   3 +-
 .../25_algorithms/copy_n/constexpr.cc         |   3 +-
 .../25_algorithms/copy_n/constrained.cc       |   3 +-
 .../25_algorithms/count/constexpr.cc          |   3 +-
 .../25_algorithms/count/constrained.cc        |   3 +-
 .../25_algorithms/count_if/constexpr.cc       |   3 +-
 .../25_algorithms/count_if/constrained.cc     |   3 +-
 .../25_algorithms/cpp_lib_constexpr.cc        |   3 +-
 .../testsuite/25_algorithms/equal/95578.cc    |   3 +-
 .../25_algorithms/equal/constexpr.cc          |   3 +-
 .../25_algorithms/equal/constexpr_neg.cc      |   3 +-
 .../25_algorithms/equal/constrained.cc        |   3 +-
 .../equal/debug/constexpr_neg.cc              |   3 +-
 .../25_algorithms/equal_range/constexpr.cc    |   3 +-
 .../25_algorithms/equal_range/constrained.cc  |   3 +-
 .../testsuite/25_algorithms/fill/94017.cc     |   3 +-
 .../testsuite/25_algorithms/fill/constexpr.cc |   3 +-
 .../25_algorithms/fill/constrained.cc         |   3 +-
 .../testsuite/25_algorithms/fill_n/94017.cc   |   3 +-
 .../25_algorithms/fill_n/constexpr.cc         |   3 +-
 .../25_algorithms/fill_n/constrained.cc       |   3 +-
 .../testsuite/25_algorithms/find/constexpr.cc |   3 +-
 .../25_algorithms/find/constrained.cc         |   3 +-
 .../25_algorithms/find_end/constexpr.cc       |   3 +-
 .../25_algorithms/find_end/constrained.cc     |   3 +-
 .../25_algorithms/find_first_of/constexpr.cc  |   3 +-
 .../find_first_of/constrained.cc              |   3 +-
 .../25_algorithms/find_if/constexpr.cc        |   3 +-
 .../25_algorithms/find_if/constrained.cc      |   3 +-
 .../25_algorithms/find_if_not/constexpr.cc    |   3 +-
 .../25_algorithms/find_if_not/constrained.cc  |   3 +-
 .../testsuite/25_algorithms/find_last/1.cc    |   1 -
 .../testsuite/25_algorithms/find_last_if/1.cc |   1 -
 .../25_algorithms/find_last_if_not/1.cc       |   1 -
 .../testsuite/25_algorithms/fold_left/1.cc    |   1 -
 .../testsuite/25_algorithms/fold_right/1.cc   |   1 -
 .../25_algorithms/for_each/constexpr.cc       |   3 +-
 .../25_algorithms/for_each/constrained.cc     |   3 +-
 .../25_algorithms/generate/constexpr.cc       |   3 +-
 .../25_algorithms/generate/constrained.cc     |   3 +-
 .../25_algorithms/generate_n/constexpr.cc     |   3 +-
 .../25_algorithms/generate_n/constrained.cc   |   3 +-
 .../25_algorithms/heap/constrained.cc         |   3 +-
 .../25_algorithms/includes/constrained.cc     |   3 +-
 .../inplace_merge/constrained.cc              |   3 +-
 .../testsuite/25_algorithms/iota/1.cc         |   1 -
 .../25_algorithms/is_heap/constexpr.cc        |   3 +-
 .../25_algorithms/is_heap_until/constexpr.cc  |   3 +-
 .../25_algorithms/is_partitioned/constexpr.cc |   3 +-
 .../is_partitioned/constrained.cc             |   3 +-
 .../25_algorithms/is_permutation/constexpr.cc |   3 +-
 .../is_permutation/constrained.cc             |   3 +-
 .../25_algorithms/is_sorted/constexpr.cc      |   3 +-
 .../25_algorithms/is_sorted/constrained.cc    |   3 +-
 .../is_sorted_until/constexpr.cc              |   3 +-
 .../is_sorted_until/constrained.cc            |   3 +-
 .../25_algorithms/iter_swap/constexpr.cc      |   3 +-
 .../lexicographical_compare/93972.cc          |   3 +-
 .../lexicographical_compare/95578.cc          |   3 +-
 .../lexicographical_compare/constexpr.cc      |   3 +-
 .../lexicographical_compare/constrained.cc    |   3 +-
 .../lexicographical_compare_three_way/1.cc    |   3 +-
 .../constexpr.cc                              |   3 +-
 .../25_algorithms/lower_bound/constexpr.cc    |   3 +-
 .../25_algorithms/lower_bound/constrained.cc  |   3 +-
 .../debug/constexpr_partitioned_neg.cc        |   3 +-
 .../debug/constexpr_partitioned_pred_neg.cc   |   3 +-
 .../debug/constexpr_valid_range_neg.cc        |   3 +-
 .../25_algorithms/make_heap/constexpr.cc      |   3 +-
 .../25_algorithms/max/constrained.cc          |   3 +-
 .../25_algorithms/max_element/constrained.cc  |   3 +-
 .../25_algorithms/merge/constexpr.cc          |   3 +-
 .../25_algorithms/merge/constrained.cc        |   3 +-
 .../25_algorithms/min/constrained.cc          |   3 +-
 .../25_algorithms/min_element/constrained.cc  |   3 +-
 .../25_algorithms/minmax/constrained.cc       |   3 +-
 .../minmax_element/constrained.cc             |   3 +-
 .../25_algorithms/mismatch/constexpr.cc       |   3 +-
 .../25_algorithms/mismatch/constrained.cc     |   3 +-
 .../testsuite/25_algorithms/move/93872.cc     |   3 +-
 .../testsuite/25_algorithms/move/95578.cc     |   3 +-
 .../testsuite/25_algorithms/move/constexpr.cc |   1 -
 .../25_algorithms/move/constrained.cc         |   3 +-
 .../25_algorithms/move_backward/93872.cc      |   3 +-
 .../25_algorithms/move_backward/95578.cc      |   3 +-
 .../move_backward/constrained.cc              |   3 +-
 .../next_permutation/constexpr.cc             |   3 +-
 .../next_permutation/constrained.cc           |   3 +-
 .../25_algorithms/none_of/constexpr.cc        |   3 +-
 .../25_algorithms/none_of/constrained.cc      |   3 +-
 .../25_algorithms/nth_element/constexpr.cc    |   3 +-
 .../25_algorithms/nth_element/constrained.cc  |   3 +-
 .../25_algorithms/partial_sort/constexpr.cc   |   3 +-
 .../25_algorithms/partial_sort/constrained.cc |   3 +-
 .../partial_sort_copy/constexpr.cc            |   3 +-
 .../partial_sort_copy/constrained.cc          |   3 +-
 .../25_algorithms/partition/constexpr.cc      |   3 +-
 .../25_algorithms/partition/constrained.cc    |   3 +-
 .../25_algorithms/partition_copy/constexpr.cc |   3 +-
 .../partition_copy/constrained.cc             |   3 +-
 .../partition_point/constexpr.cc              |   3 +-
 .../partition_point/constrained.cc            |   3 +-
 .../25_algorithms/pop_heap/constexpr.cc       |   3 +-
 .../prev_permutation/constexpr.cc             |   3 +-
 .../prev_permutation/constrained.cc           |   3 +-
 .../25_algorithms/push_heap/constexpr.cc      |   3 +-
 .../25_algorithms/remove/constexpr.cc         |   3 +-
 .../25_algorithms/remove/constrained.cc       |   3 +-
 .../25_algorithms/remove_copy/constexpr.cc    |   3 +-
 .../25_algorithms/remove_copy/constrained.cc  |   3 +-
 .../25_algorithms/remove_copy_if/constexpr.cc |   3 +-
 .../remove_copy_if/constrained.cc             |   3 +-
 .../25_algorithms/remove_if/constexpr.cc      |   3 +-
 .../25_algorithms/remove_if/constrained.cc    |   3 +-
 .../25_algorithms/replace/constrained.cc      |   3 +-
 .../25_algorithms/replace_copy/constexpr.cc   |   3 +-
 .../25_algorithms/replace_copy/constrained.cc |   3 +-
 .../replace_copy_if/constexpr.cc              |   3 +-
 .../replace_copy_if/constrained.cc            |   3 +-
 .../25_algorithms/replace_if/constexpr.cc     |   3 +-
 .../25_algorithms/replace_if/constrained.cc   |   3 +-
 .../25_algorithms/reverse/constexpr.cc        |   3 +-
 .../25_algorithms/reverse/constrained.cc      |   3 +-
 .../25_algorithms/reverse_copy/constexpr.cc   |   3 +-
 .../25_algorithms/reverse_copy/constrained.cc |   3 +-
 .../25_algorithms/rotate/constexpr.cc         |   3 +-
 .../25_algorithms/rotate/constrained.cc       |   3 +-
 .../25_algorithms/rotate_copy/constexpr.cc    |   3 +-
 .../25_algorithms/rotate_copy/constrained.cc  |   3 +-
 .../25_algorithms/sample/constrained.cc       |   3 +-
 .../25_algorithms/search/constexpr.cc         |   3 +-
 .../25_algorithms/search/constrained.cc       |   3 +-
 .../testsuite/25_algorithms/search_n/97828.cc |   3 +-
 .../25_algorithms/search_n/constexpr.cc       |   3 +-
 .../25_algorithms/search_n/constrained.cc     |   3 +-
 .../25_algorithms/set_difference/constexpr.cc |   3 +-
 .../set_difference/constrained.cc             |   3 +-
 .../set_intersection/constexpr.cc             |   3 +-
 .../set_intersection/constrained.cc           |   3 +-
 .../set_symmetric_difference/constexpr.cc     |   3 +-
 .../set_symmetric_difference/constrained.cc   |   3 +-
 .../25_algorithms/set_union/constexpr.cc      |   3 +-
 .../25_algorithms/set_union/constrained.cc    |   3 +-
 .../testsuite/25_algorithms/shift_left/1.cc   |   3 +-
 .../testsuite/25_algorithms/shift_right/1.cc  |   3 +-
 .../25_algorithms/shuffle/constrained.cc      |   3 +-
 .../testsuite/25_algorithms/sort/constexpr.cc |   3 +-
 .../25_algorithms/sort/constrained.cc         |   3 +-
 .../25_algorithms/sort_heap/constexpr.cc      |   3 +-
 .../stable_partition/constrained.cc           |   3 +-
 .../25_algorithms/stable_sort/constrained.cc  |   3 +-
 .../testsuite/25_algorithms/swap/constexpr.cc |   3 +-
 .../25_algorithms/swap_ranges/constexpr.cc    |   3 +-
 .../25_algorithms/swap_ranges/constrained.cc  |   3 +-
 .../25_algorithms/transform/constexpr.cc      |   3 +-
 .../25_algorithms/transform/constrained.cc    |   3 +-
 .../25_algorithms/unique/constexpr.cc         |   3 +-
 .../25_algorithms/unique/constrained.cc       |   3 +-
 .../25_algorithms/unique_copy/constexpr.cc    |   3 +-
 .../25_algorithms/unique_copy/constrained.cc  |   3 +-
 .../25_algorithms/upper_bound/constexpr.cc    |   3 +-
 .../25_algorithms/upper_bound/constrained.cc  |   3 +-
 .../debug/constexpr_partitioned_neg.cc        |   3 +-
 .../debug/constexpr_partitioned_pred_neg.cc   |   3 +-
 .../debug/constexpr_valid_range_neg.cc        |   3 +-
 .../26_numerics/bit/bit.byteswap/byteswap.cc  |   1 -
 .../26_numerics/bit/bit.byteswap/version.cc   |   1 -
 .../26_numerics/complex/ext_c++23.cc          |   1 -
 .../cmath/c99_classification_macros_c++23.cc  |   1 -
 .../headers/cmath/constexpr_std_c++23.cc      |   1 -
 .../headers/cmath/functions_std_c++23.cc      |   1 -
 .../headers/cmath/nextafter_c++23.cc          |   1 -
 .../testsuite/26_numerics/numbers/4.cc        |   1 -
 .../inserters_other/char/volatile_ptr.cc      |   2 +-
 .../filesystem/path/native/conv_c++23.cc      |   1 -
 libstdc++-v3/testsuite/27_io/spanstream/1.cc  |   1 -
 libstdc++-v3/testsuite/27_io/spanstream/2.cc  |   1 -
 .../testsuite/27_io/spanstream/version.cc     |   1 -
 .../atomic_float/requirements_cxx23.cc        |   1 -
 .../headers/stdatomic.h/c_compat.cc           |   1 -
 .../29_atomics/headers/stdatomic.h/version.cc |   1 -
 .../stop_token/wait_on.cc                     |   6 +-
 .../packaged_task/cons/deduction_c++23.cc     |   1 -
 .../stop_token/stop_callback/deadlock-mt.cc   |   5 +-
 .../stop_token/stop_callback/destroy.cc       |   5 +-
 libstdc++-v3/testsuite/Makefile.am            |   1 +
 libstdc++-v3/testsuite/Makefile.in            |   1 +
 .../filesystem/path/native/conv_c++23.cc      |   1 -
 libstdc++-v3/testsuite/lib/dg-options.exp     |   7 ++
 libstdc++-v3/testsuite/lib/libstdc++.exp      | 107 ++++++++++++++++++
 .../testsuite/libstdc++-dg/conformance.exp    |   3 +-
 libstdc++-v3/testsuite/std/concepts/1.cc      |   3 +-
 libstdc++-v3/testsuite/std/concepts/2.cc      |   3 +-
 .../concepts/concepts.callable/invocable.cc   |   3 +-
 .../concepts.callable/regular_invocable.cc    |   3 +-
 .../concepts/concepts.callable/relation.cc    |   3 +-
 .../concepts.callable/strictweakorder.cc      |   3 +-
 .../concept.arithmetic/floating_point.cc      |   3 +-
 .../concept.arithmetic/integral.cc            |   3 +-
 .../concept.arithmetic/signed_integral.cc     |   3 +-
 .../concept.arithmetic/unsigned_integral.cc   |   3 +-
 .../concepts.lang/concept.assignable/1.cc     |   3 +-
 .../concepts.lang/concept.common/1.cc         |   3 +-
 .../concepts.lang/concept.commonref/1.cc      |   3 +-
 .../concepts.lang/concept.constructible/1.cc  |   3 +-
 .../concepts.lang/concept.convertible/1.cc    |   3 +-
 .../concept.copyconstructible/1.cc            |   3 +-
 .../concept.defaultinitializable/1.cc         |   3 +-
 .../concept.defaultinitializable/lwg3149.cc   |   3 +-
 .../concepts.lang/concept.derived/1.cc        |   3 +-
 .../concepts.lang/concept.destructible/1.cc   |   3 +-
 .../concept.moveconstructible/1.cc            |   3 +-
 .../concepts/concepts.lang/concept.same/1.cc  |   3 +-
 .../concepts.lang/concept.swappable/swap.cc   |   3 +-
 .../concept.swappable/swappable.cc            |   3 +-
 .../concept.swappable/swappable_with.cc       |   3 +-
 .../std/concepts/concepts.object/copyable.cc  |   3 +-
 .../std/concepts/concepts.object/movable.cc   |   3 +-
 .../std/concepts/concepts.object/regular.cc   |   3 +-
 .../concepts/concepts.object/semiregular.cc   |   3 +-
 .../testsuite/std/format/arguments/args.cc    |   1 -
 .../testsuite/std/format/arguments/lwg3810.cc |   1 -
 libstdc++-v3/testsuite/std/format/error.cc    |   1 -
 .../testsuite/std/format/format_string.cc     |   1 -
 .../testsuite/std/format/formatter/concept.cc |   1 -
 .../std/format/formatter/ext_float.cc         |   1 -
 .../std/format/formatter/requirements.cc      |   1 -
 .../testsuite/std/format/functions/107871.cc  |   1 -
 .../testsuite/std/format/functions/format.cc  |   1 -
 .../std/format/functions/format_c++23.cc      |   5 -
 .../std/format/functions/format_to.cc         |   1 -
 .../std/format/functions/format_to_n.cc       |   1 -
 .../testsuite/std/format/functions/size.cc    |   1 -
 .../std/format/functions/vformat_to.cc        |   1 -
 .../testsuite/std/format/parse_ctx.cc         |   1 -
 libstdc++-v3/testsuite/std/format/string.cc   |   1 -
 .../testsuite/std/format/string_neg.cc        |   1 -
 libstdc++-v3/testsuite/std/ranges/97600.cc    |   3 +-
 .../testsuite/std/ranges/access/101782.cc     |   2 +-
 .../testsuite/std/ranges/access/begin.cc      |   3 +-
 .../testsuite/std/ranges/access/begin_neg.cc  |   3 +-
 .../testsuite/std/ranges/access/cbegin.cc     |   3 +-
 .../testsuite/std/ranges/access/cdata.cc      |   3 +-
 .../testsuite/std/ranges/access/cend.cc       |   3 +-
 .../testsuite/std/ranges/access/crbegin.cc    |   3 +-
 .../testsuite/std/ranges/access/crend.cc      |   3 +-
 .../testsuite/std/ranges/access/data.cc       |   3 +-
 .../testsuite/std/ranges/access/empty.cc      |   3 +-
 .../testsuite/std/ranges/access/end.cc        |   3 +-
 .../testsuite/std/ranges/access/end_neg.cc    |   3 +-
 .../testsuite/std/ranges/access/lwg3467.cc    |   3 +-
 .../testsuite/std/ranges/access/p2602.cc      |   1 -
 .../testsuite/std/ranges/access/rbegin.cc     |   3 +-
 .../testsuite/std/ranges/access/rend.cc       |   3 +-
 .../testsuite/std/ranges/access/size.cc       |   3 +-
 .../testsuite/std/ranges/access/size_neg.cc   |   3 +-
 .../testsuite/std/ranges/access/ssize.cc      |   3 +-
 .../testsuite/std/ranges/adaptors/100479.cc   |   3 +-
 .../testsuite/std/ranges/adaptors/100577.cc   |   3 +-
 .../testsuite/std/ranges/adaptors/93978.cc    |   3 +-
 .../testsuite/std/ranges/adaptors/95322.cc    |   3 +-
 .../testsuite/std/ranges/adaptors/99433.cc    |   3 +-
 .../std/ranges/adaptors/adjacent/1.cc         |   1 -
 .../ranges/adaptors/adjacent_transform/1.cc   |   1 -
 .../testsuite/std/ranges/adaptors/all.cc      |   3 +-
 .../std/ranges/adaptors/as_const/1.cc         |   1 -
 .../std/ranges/adaptors/as_rvalue/1.cc        |   1 -
 .../testsuite/std/ranges/adaptors/chunk/1.cc  |   1 -
 .../std/ranges/adaptors/chunk_by/1.cc         |   1 -
 .../testsuite/std/ranges/adaptors/common.cc   |   3 +-
 .../ranges/adaptors/conditionally_borrowed.cc |   3 +-
 .../testsuite/std/ranges/adaptors/counted.cc  |   3 +-
 .../ranges/adaptors/detail/copyable_box.cc    |   3 +-
 .../testsuite/std/ranges/adaptors/drop.cc     |   3 +-
 .../std/ranges/adaptors/drop_while.cc         |   3 +-
 .../testsuite/std/ranges/adaptors/elements.cc |   3 +-
 .../std/ranges/adaptors/enumerate/1.cc        |   1 -
 .../testsuite/std/ranges/adaptors/filter.cc   |   3 +-
 .../testsuite/std/ranges/adaptors/join.cc     |   3 +-
 .../std/ranges/adaptors/join_with/1.cc        |   1 -
 .../std/ranges/adaptors/lazy_split.cc         |   3 +-
 .../std/ranges/adaptors/lazy_split_neg.cc     |   3 +-
 .../testsuite/std/ranges/adaptors/lwg3286.cc  |   3 +-
 .../std/ranges/adaptors/lwg3313_neg.cc        |   3 +-
 .../std/ranges/adaptors/lwg3325_neg.cc        |   3 +-
 .../testsuite/std/ranges/adaptors/lwg3406.cc  |   3 +-
 .../testsuite/std/ranges/adaptors/lwg3715.cc  |   1 -
 .../testsuite/std/ranges/adaptors/p1739.cc    |   1 -
 .../testsuite/std/ranges/adaptors/p2281.cc    |   3 +-
 .../testsuite/std/ranges/adaptors/p2770r0.cc  |   1 -
 .../testsuite/std/ranges/adaptors/reverse.cc  |   3 +-
 .../testsuite/std/ranges/adaptors/sizeof.cc   |   3 +-
 .../testsuite/std/ranges/adaptors/slide/1.cc  |   1 -
 .../testsuite/std/ranges/adaptors/split.cc    |   3 +-
 .../testsuite/std/ranges/adaptors/stride/1.cc |   1 -
 .../testsuite/std/ranges/adaptors/take.cc     |   3 +-
 .../std/ranges/adaptors/take_while.cc         |   3 +-
 .../std/ranges/adaptors/transform.cc          |   3 +-
 .../std/ranges/cartesian_product/1.cc         |   1 -
 .../testsuite/std/ranges/empty_view.cc        |   3 +-
 .../std/ranges/headers/ranges/synopsis.cc     |   3 +-
 .../testsuite/std/ranges/iota/93267.cc        |   4 +-
 .../testsuite/std/ranges/iota/96042.cc        |   4 +-
 .../std/ranges/iota/difference_type.cc        |   3 +-
 .../testsuite/std/ranges/iota/iota_view.cc    |   3 +-
 .../testsuite/std/ranges/iota/iterator.cc     |   3 +-
 .../testsuite/std/ranges/iota/lwg3292_neg.cc  |   3 +-
 .../std/ranges/iota/max_size_type.cc          |   3 +-
 .../testsuite/std/ranges/iota/size.cc         |   2 +-
 .../testsuite/std/ranges/istream_view.cc      |   3 +-
 libstdc++-v3/testsuite/std/ranges/p2259.cc    |   3 +-
 libstdc++-v3/testsuite/std/ranges/p2367.cc    |   3 +-
 libstdc++-v3/testsuite/std/ranges/range.cc    |   3 +-
 .../std/ranges/range_adaptor_closure.cc       |   1 -
 .../testsuite/std/ranges/refinements.cc       |   3 +-
 libstdc++-v3/testsuite/std/ranges/repeat/1.cc |   1 -
 .../testsuite/std/ranges/safe_range.cc        |   3 +-
 .../testsuite/std/ranges/safe_range_types.cc  |   3 +-
 .../testsuite/std/ranges/single_view.cc       |   3 +-
 libstdc++-v3/testsuite/std/ranges/sized.cc    |   3 +-
 .../testsuite/std/ranges/subrange/96042.cc    |   4 +-
 .../testsuite/std/ranges/subrange/97512.cc    |   3 +-
 .../std/ranges/subrange/lwg3282_neg.cc        |   7 +-
 .../testsuite/std/ranges/subrange/lwg3286.cc  |   3 +-
 .../testsuite/std/ranges/subrange/lwg3433.cc  |   3 +-
 .../testsuite/std/ranges/subrange/sizeof.cc   |   3 +-
 .../std/ranges/subrange/tuple_like.cc         |   3 +-
 .../testsuite/std/ranges/version_c++23.cc     |   1 -
 libstdc++-v3/testsuite/std/ranges/view.cc     |   3 +-
 libstdc++-v3/testsuite/std/ranges/zip/1.cc    |   1 -
 .../testsuite/std/ranges/zip_transform/1.cc   |   1 -
 .../testsuite/std/time/clock/file/io.cc       |   1 -
 .../testsuite/std/time/clock/file/members.cc  |   3 +-
 .../testsuite/std/time/clock/file/overview.cc |   3 +-
 .../testsuite/std/time/clock/gps/1.cc         |   1 -
 .../testsuite/std/time/clock/gps/io.cc        |   1 -
 .../testsuite/std/time/clock/local/io.cc      |   1 -
 .../testsuite/std/time/clock/system/io.cc     |   1 -
 .../testsuite/std/time/clock/tai/1.cc         |   1 -
 .../testsuite/std/time/clock/tai/io.cc        |   1 -
 .../testsuite/std/time/clock/utc/1.cc         |   1 -
 .../testsuite/std/time/clock/utc/io.cc        |   1 -
 .../std/time/clock/utc/leap_second_info.cc    |   1 -
 libstdc++-v3/testsuite/std/time/day/1.cc      |   3 +-
 libstdc++-v3/testsuite/std/time/day/io.cc     |   1 -
 libstdc++-v3/testsuite/std/time/exceptions.cc |   1 -
 libstdc++-v3/testsuite/std/time/format.cc     |   1 -
 libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc |   3 +-
 .../testsuite/std/time/hh_mm_ss/109772.cc     |   1 -
 .../testsuite/std/time/hh_mm_ss/io.cc         |   1 -
 libstdc++-v3/testsuite/std/time/is_am/1.cc    |   3 +-
 libstdc++-v3/testsuite/std/time/is_pm/1.cc    |   3 +-
 libstdc++-v3/testsuite/std/time/make12/1.cc   |   3 +-
 libstdc++-v3/testsuite/std/time/make24/1.cc   |   3 +-
 libstdc++-v3/testsuite/std/time/month/1.cc    |   3 +-
 libstdc++-v3/testsuite/std/time/month/io.cc   |   1 -
 .../testsuite/std/time/month_day/1.cc         |   3 +-
 .../testsuite/std/time/month_day/io.cc        |   1 -
 .../testsuite/std/time/month_day_last/1.cc    |   3 +-
 .../testsuite/std/time/month_day_last/io.cc   |   1 -
 .../testsuite/std/time/month_weekday/1.cc     |   3 +-
 .../testsuite/std/time/month_weekday/io.cc    |   1 -
 .../std/time/month_weekday_last/1.cc          |   3 +-
 .../std/time/month_weekday_last/io.cc         |   1 -
 libstdc++-v3/testsuite/std/time/parse.cc      |   1 -
 libstdc++-v3/testsuite/std/time/syn_c++20.cc  |   3 +-
 .../std/time/time_zone/get_info_local.cc      |   1 -
 .../std/time/time_zone/get_info_sys.cc        |   1 -
 .../std/time/time_zone/requirements.cc        |   1 -
 .../testsuite/std/time/traits/is_clock.cc     |   3 +-
 libstdc++-v3/testsuite/std/time/tzdb/1.cc     |   1 -
 .../testsuite/std/time/tzdb/leap_seconds.cc   |   1 -
 .../testsuite/std/time/tzdb_list/1.cc         |   1 -
 .../std/time/tzdb_list/requirements.cc        |   1 -
 libstdc++-v3/testsuite/std/time/weekday/1.cc  |   3 +-
 libstdc++-v3/testsuite/std/time/weekday/io.cc |   1 -
 .../testsuite/std/time/weekday_indexed/1.cc   |   3 +-
 .../testsuite/std/time/weekday_indexed/io.cc  |   1 -
 .../testsuite/std/time/weekday_last/1.cc      |   3 +-
 .../testsuite/std/time/weekday_last/io.cc     |   1 -
 libstdc++-v3/testsuite/std/time/year/1.cc     |   3 +-
 libstdc++-v3/testsuite/std/time/year/2.cc     |   3 +-
 libstdc++-v3/testsuite/std/time/year/io.cc    |   1 -
 .../testsuite/std/time/year_month/1.cc        |   3 +-
 .../testsuite/std/time/year_month/2.cc        |   3 +-
 .../testsuite/std/time/year_month/io.cc       |   1 -
 .../testsuite/std/time/year_month_day/1.cc    |   3 +-
 .../testsuite/std/time/year_month_day/2.cc    |   3 +-
 .../testsuite/std/time/year_month_day/3.cc    |   3 +-
 .../testsuite/std/time/year_month_day/4.cc    |   3 +-
 .../testsuite/std/time/year_month_day/io.cc   |   1 -
 .../std/time/year_month_day_last/1.cc         |   3 +-
 .../std/time/year_month_day_last/2.cc         |   3 +-
 .../std/time/year_month_day_last/io.cc        |   1 -
 .../std/time/year_month_weekday/1.cc          |   3 +-
 .../std/time/year_month_weekday/2.cc          |   3 +-
 .../std/time/year_month_weekday/3.cc          |   3 +-
 .../std/time/year_month_weekday/io.cc         |   1 -
 .../std/time/year_month_weekday_last/1.cc     |   3 +-
 .../std/time/year_month_weekday_last/2.cc     |   3 +-
 .../std/time/year_month_weekday_last/io.cc    |   1 -
 .../testsuite/std/time/zoned_time/1.cc        |   1 -
 .../testsuite/std/time/zoned_time/custom.cc   |   1 -
 .../std/time/zoned_time/deduction.cc          |   1 -
 .../testsuite/std/time/zoned_time/io.cc       |   1 -
 .../testsuite/std/time/zoned_time/req_neg.cc  |   1 -
 .../std/time/zoned_time/requirements.cc       |   1 -
 .../testsuite/std/time/zoned_traits.cc        |   1 -
 .../07_conf_hyperg/compile_cxx17.cc           |   2 +-
 .../17_hyperg/compile_cxx17.cc                |   2 +-
 585 files changed, 622 insertions(+), 1029 deletions(-)
 delete mode 100644 libstdc++-v3/testsuite/std/format/functions/format_c++23.cc

-- 
2.41.0


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

* [PATCH 01/13] libstdc++: Add support for running tests with multiple -std options
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std Jonathan Wakely
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

This copies the code from the compiler's gcc/testsuite/lib/g++-dg.exp so
that each test can be run multiple times, with different -std options.
This means that we can remove most { dg-options "-std=gnu++20" }
directives from tests, because the testsuite will automatically select
a set of -std options that includes that version.

Tests that should only run for a specific standard (e.g. ones that use
something like { dg-do run { target c++11_only } }) should still specify
that standard with { dg-options "-std=gnu++11" }, which overrides the
automatic selection. But a dg-options that selects a newer standard than
the default can be removed, because that standard will be selected
automatically based on a selector like { target c++20 } in the dg-do
directive. This will allow those tests to be run for more than just the
one they currently hardcode, so that e.g. std::format tests can be run
for all of C++20, C++23 and C++26. Currently that has to be done by
adding a second test file that uses a different dg-options line.

By default most tests will continue to run with only the default dialect
(currently -std=gnu++17) so that the time to run the entire testsuite is
not increased. We can revisit this later if increasing the testsuite
time (and coverage) is acceptable. Libstdc++ developers can easily
override the defaults to run for multiple versions. To test all
versions, either add 'set v3_std_list { 98 11 14 17 20 23 26 }' to
~/.dejagnurc or define GLIBCXX_TESTSUITE_STDS="98,11,14,17,20,23,26" in
the environment.

This should be more efficient than the current way to test with multple
standards, i.e. --target_board=unix{-std=c++14,-std=c++17,-std=c++20},
because today all tests with an explicit -std option hardcoded in them
get run for each target board variation but using the exact same
hardcoded -std every time. With the new approach you can just use the
default --target_board=unix and set GLIBCXX_TESTSUITE_STDS="14,17,20"
and now a test that has { target c++20 } will only run once (and be
UNSUPPORTED twice), instead of running with identical options three
times.

In order to support ~/.dejagnurc and $DEJAGNU files that need to work
with versions of GCC without this change, a new variable is added to
site.tmp to detect whether v3_std_list is supported. That allows e.g.

if { [info exists v3-use-std-list] } {
  set v3_std_list { 11 17 23 }
  set target_list { "unix{,-m32}" }
} else {
  set target_list { "unix{,-std=gnu++2b,-std=gnu++11,-m32}" }
}

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Update documentation on running and
	writing tests.
	* doc/html/manual/test.html: Regenerate.
	* testsuite/Makefile.am: Add v3-use-std-list to site.tmp
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/dg-options.exp (add_options_for_strict_std): New
	proc.
	* testsuite/lib/libstdc++.exp (search_for): New utility proc.
	(v3-dg-runtest): New proc to replace dg-runtest.
	* testsuite/libstdc++-dg/conformance.exp: Use v3-dg-runtest.
---
 libstdc++-v3/doc/html/manual/test.html        |  46 +++++---
 libstdc++-v3/doc/xml/manual/test.xml          |  52 ++++++---
 libstdc++-v3/testsuite/Makefile.am            |   1 +
 libstdc++-v3/testsuite/Makefile.in            |   1 +
 libstdc++-v3/testsuite/lib/dg-options.exp     |   7 ++
 libstdc++-v3/testsuite/lib/libstdc++.exp      | 107 ++++++++++++++++++
 .../testsuite/libstdc++-dg/conformance.exp    |   3 +-
 7 files changed, 186 insertions(+), 31 deletions(-)

diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html
index fadadf249bb..b29c2eb359e 100644
--- a/libstdc++-v3/doc/html/manual/test.html
+++ b/libstdc++-v3/doc/html/manual/test.html
@@ -350,6 +350,16 @@ cat 27_io/objects/char/3_xin.in | a.out</pre></dd><dt><span class="term"><code c
       <code class="literal">unix/-O3\"{-std=gnu++98,-std=gnu++11,}\"</code> so that
       the third variation would use the default for <code class="option">-std</code>
       (which is <code class="option">-std=gnu++14</code> as of GCC 6).
+    </p><p>
+      Since GCC 14, the libstdc++ testsuite has built-in support for running
+      tests with more than one <code class="option">-std</code>, similar to the G++ tests.
+      Adding <code class="code">set v3_std_list { 11 17 23 }</code> to
+      <code class="filename">~/.dejagnurc</code> or a file named by the
+      <code class="envar">DEJAGNU</code> environment variable will cause every test to
+      be run three times, using a different <code class="option">-std</code> each time.
+      Alternatively, a list of standard versions to test with can be specified
+      as a comma-separated list in the <span style="color: red">&lt;envvar&gt;GLIBCXX_TESTSUITE_STDS&lt;/envvar&gt;</span>
+      environment variable.
     </p><p>
       To run the libstdc++ test suite under the
       <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, use
@@ -467,11 +477,12 @@ cat 27_io/objects/char/3_xin.in | a.out</pre></dd><dt><span class="term"><code c
     It is possible to indicate that a test should <span class="emphasis"><em>only</em></span>
     be run for a specific standard (and not later standards) using an
     effective target like <code class="literal">c++11_only</code>. However, this means
-    the test will be skipped by default (because the default mode is
-    <code class="literal">gnu++14</code>), and so will only run when
-    <code class="option">-std=gnu++11</code> or <code class="option">-std=c++11</code> is used
-    explicitly. For tests that require a specific standard it is better to
-    use a <code class="literal">dg-options</code> directive:
+    the test will be skipped by default unless <code class="option">-std=gnu++11</code>
+    or <code class="option">-std=c++11</code> is explicitly specified, either via a
+    target board, the <code class="varname">v3_std_list</code> dejagnu variable,
+    or the <span style="color: red">&lt;envvar&gt;GLIBCXX_TESTSUITE_STDS&lt;/envvar&gt;</span> environment variable.
+    For tests that require a specific standard it is useful to also add a
+    <code class="literal">dg-options</code> directive:
 </p><pre class="programlisting">    // { dg-options "-std=gnu++11" }</pre><p>
     This means the test will not get skipped by default, and will always use
     the specific standard dialect that the test requires. This isn't needed
@@ -479,16 +490,21 @@ cat 27_io/objects/char/3_xin.in | a.out</pre></dd><dt><span class="term"><code c
     minimum standard instead, to allow them to be tested for all
     possible variations.
   </p><p>
-    Similarly, tests which depend on a newer standard than the default
-    must use <code class="literal">dg-options</code> instead of (or in addition to)
-    an effective target, so that they are not skipped by default.
-    For example, tests for C++17 features should use
-</p><pre class="programlisting">    // { dg-options "-std=gnu++17" }</pre><p>
-    before any <code class="literal">dg-do</code> such as:
-</p><pre class="programlisting">    // { dg-do run "c++17" }</pre><p>
-    The <code class="literal">dg-options</code> directive must come first, so that
-    the <code class="literal">-std</code> flag has already been added to the options
-    before checking the <code class="literal">c++17</code> target.
+    N.B. when a <code class="literal">dg-options</code> directive is used, it must come
+    first so dejagnu will include those options when checking against any
+    effective targets in <code class="literal">dg-do</code> and
+    <code class="literal">dg-require-effective-target</code> directives.
+  </p><p>
+    Since GCC 14, tests which depend on a newer standard than the default
+    do not need to specify that standard in a <code class="literal">dg-options</code>
+    directive. The testsuite will detect when a test requires a newer standard
+    and will automatically add a suitable <code class="option">-std</code> flag.
+  </p><p>
+    If a testcase requires the use of a strict language dialect, e.g.
+    <code class="option">-std=c++11</code> rather than <code class="option">-std=gnu++11</code>,
+    the following directive will cause that to be used when the testsuite
+    decides which <code class="option">-std</code> options to use for the test:
+</p><pre class="programlisting">    // { dg-add-options strict_std }</pre><p>
   </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="tests.dg.examples"></a>Examples of Test Directives</h4></div></div></div><p>
 Example 1: Testing compilation only:
 </p><pre class="programlisting">
diff --git a/libstdc++-v3/doc/xml/manual/test.xml b/libstdc++-v3/doc/xml/manual/test.xml
index 964c53d2632..936f97417af 100644
--- a/libstdc++-v3/doc/xml/manual/test.xml
+++ b/libstdc++-v3/doc/xml/manual/test.xml
@@ -598,6 +598,18 @@ cat 27_io/objects/char/3_xin.in | a.out</programlisting>
       (which is <option>-std=gnu++14</option> as of GCC 6).
     </para>
 
+    <para>
+      Since GCC 14, the libstdc++ testsuite has built-in support for running
+      tests with more than one <option>-std</option>, similar to the G++ tests.
+      Adding <code>set v3_std_list { 11 17 23 }</code> to
+      <filename>~/.dejagnurc</filename> or a file named by the
+      <envar>DEJAGNU</envar> environment variable will cause every test to
+      be run three times, using a different <option>-std</option> each time.
+      Alternatively, a list of standard versions to test with can be specified
+      as a comma-separated list in the <envvar>GLIBCXX_TESTSUITE_STDS</envvar>
+      environment variable.
+    </para>
+
     <para>
       To run the libstdc++ test suite under the
       <link linkend="manual.ext.debug_mode">debug mode</link>, use
@@ -766,11 +778,12 @@ cat 27_io/objects/char/3_xin.in | a.out</programlisting>
     It is possible to indicate that a test should <emphasis>only</emphasis>
     be run for a specific standard (and not later standards) using an
     effective target like <literal>c++11_only</literal>. However, this means
-    the test will be skipped by default (because the default mode is
-    <literal>gnu++14</literal>), and so will only run when
-    <option>-std=gnu++11</option> or <option>-std=c++11</option> is used
-    explicitly. For tests that require a specific standard it is better to
-    use a <literal>dg-options</literal> directive:
+    the test will be skipped by default unless <option>-std=gnu++11</option>
+    or <option>-std=c++11</option> is explicitly specified, either via a
+    target board, the <varname>v3_std_list</varname> dejagnu variable,
+    or the <envvar>GLIBCXX_TESTSUITE_STDS</envvar> environment variable.
+    For tests that require a specific standard it is useful to also add a
+    <literal>dg-options</literal> directive:
 <programlisting>    // { dg-options "-std=gnu++11" }</programlisting>
     This means the test will not get skipped by default, and will always use
     the specific standard dialect that the test requires. This isn't needed
@@ -780,16 +793,25 @@ cat 27_io/objects/char/3_xin.in | a.out</programlisting>
   </para>
 
   <para>
-    Similarly, tests which depend on a newer standard than the default
-    must use <literal>dg-options</literal> instead of (or in addition to)
-    an effective target, so that they are not skipped by default.
-    For example, tests for C++17 features should use
-<programlisting>    // { dg-options "-std=gnu++17" }</programlisting>
-    before any <literal>dg-do</literal> such as:
-<programlisting>    // { dg-do run "c++17" }</programlisting>
-    The <literal>dg-options</literal> directive must come first, so that
-    the <literal>-std</literal> flag has already been added to the options
-    before checking the <literal>c++17</literal> target.
+    N.B. when a <literal>dg-options</literal> directive is used, it must come
+    first so dejagnu will include those options when checking against any
+    effective targets in <literal>dg-do</literal> and
+    <literal>dg-require-effective-target</literal> directives.
+  </para>
+
+  <para>
+    Since GCC 14, tests which depend on a newer standard than the default
+    do not need to specify that standard in a <literal>dg-options</literal>
+    directive. The testsuite will detect when a test requires a newer standard
+    and will automatically add a suitable <option>-std</option> flag.
+  </para>
+
+  <para>
+    If a testcase requires the use of a strict language dialect, e.g.
+    <option>-std=c++11</option> rather than <option>-std=gnu++11</option>,
+    the following directive will cause that to be used when the testsuite
+    decides which <option>-std</option> options to use for the test:
+<programlisting>    // { dg-add-options strict_std }</programlisting>
   </para>
 
 <section xml:id="tests.dg.examples"><info><title>Examples of Test Directives</title></info>
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index ef579d97efa..4cee585fd8e 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -61,6 +61,7 @@ site.exp: Makefile
 	@echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
 	@echo 'set baseline_subdir_switch "$(baseline_subdir_switch)"' >> site.tmp
 	@echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
+	@echo 'set v3-use-std-list 1' >> site.tmp
 	@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
 	@test ! -f site.exp || \
 	  sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 462db4fd709..2e42d470645 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -624,6 +624,7 @@ site.exp: Makefile
 	@echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
 	@echo 'set baseline_subdir_switch "$(baseline_subdir_switch)"' >> site.tmp
 	@echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
+	@echo 'set v3-use-std-list 1' >> site.tmp
 	@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
 	@test ! -f site.exp || \
 	  sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index 7ee32fbbf71..011bb0ec10f 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -352,6 +352,13 @@ proc add_options_for_using-deprecated { flags } {
     return "$flags -U_GLIBCXX_USE_DEPRECATED -D_GLIBCXX_USE_DEPRECATED=1"
 }
 
+# Add options for strict -std=c++NN dialects.
+# This is a dummy option that does nothing, but it causes v3-dg-runtest
+# to alter its behaviour.
+proc add_options_for_strict_std { flags } {
+    return $flags
+}
+
 # Like dg-options, but adds to the default options rather than replacing them.
 
 proc dg-additional-options { args } {
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 271f8772caf..2c497707184 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -44,6 +44,21 @@ proc load_gcc_lib { filename } {
     set loaded_libs($filename) ""
 }
 
+#
+# search_for -- looks for a string match in a file
+#
+proc search_for { file pattern } {
+    set fd [open $file r]
+    while { [gets $fd cur_line]>=0 } {
+	if [string match "*$pattern*" $cur_line] then {
+	    close $fd
+	    return 1
+	}
+    }
+    close $fd
+    return 0
+}
+
 # system routines
 load_lib dg.exp
 load_lib libgloss.exp
@@ -459,6 +474,98 @@ if { [info procs saved-dg-test] == [list] } {
     }
 }
 
+# Find the minimum standard required by a test, if higher than the default_std.
+proc v3-minimum-std { test default_std max_std } {
+    for {set s $default_std} {$s <= $max_std} {incr s 3} {
+	if [search_for $test "\{ dg-do * \{ target c++$s"] {
+	    return $s
+	} elseif [search_for $test "\{ dg-require-effective-target c++$s"] {
+	    return $s
+	}
+    }
+    # TODO: replace all c++2a with c++20 and remove this case.
+    if [search_for $test "\{ dg-do * \{ target c++2a"] {
+	return 20
+    }
+    return $default_std
+}
+
+# Allow v3_std_list to be set in configuration files, e.g., ~/.dejagnurc
+if ![info exists v3_std_list] {
+    set v3_std_list { }
+}
+# Allow v3_std_list to be set from the environment.
+if [info exists env(GLIBCXX_TESTSUITE_STDS)] {
+    set v3_std_list [split $env(GLIBCXX_TESTSUITE_STDS) ","]
+}
+
+# Modified dg-runtest that runs tests in multiple standard modes,
+# unless they specifically specify one standard.
+proc v3-dg-runtest { testcases flags default-extra-flags } {
+    global runtests
+
+    foreach test $testcases {
+	# If we're only testing specific files and this isn't one of them, skip it.
+	if ![runtest_file_p $runtests $test] {
+	    continue
+	}
+
+	# If the testcase specifies a standard, use that one.
+	# If not, run it under several standards, allowing GNU extensions
+	# unless strict_std is requested.
+	if ![search_for $test "// \{ dg-*options*-std=*++"] {
+	    if [search_for $test "{ dg-add-options strict_std }"] {
+		set std_prefix "-std=c++"
+	    } else {
+		set std_prefix "-std=gnu++"
+	    }
+
+	    # See above for the initial value of this list.
+	    global v3_std_list
+	    if { [llength $v3_std_list] > 0 } {
+		set std_list $v3_std_list
+	    } else {
+		# If the test requires a newer C++ version than which
+		# is tested by default, use that C++ version for that
+		# single test.
+		# These should be adjusted whenever the default -std is
+		# updated or newer C++ effective target is added.
+		set default_std 17
+		set max_std 26
+		set min_std [v3-minimum-std $test $default_std $max_std]
+		if { $min_std > $default_std } {
+		    set std_list $min_std
+		    if { $min_std != $max_std } {
+			# Also test the latest version.
+			lappend std_list "$max_std"
+		    }
+		} else {
+		    # Only run each test once with the default -std option.
+		    # This avoids increasing the run time for most testers.
+		    # Libstdc++ developers can override this with v3_std_list.
+		    set std_list $default_std
+		}
+	    }
+	    set option_list { }
+	    foreach x $std_list {
+		if { $x eq "impcx" } then { set x "26 -fimplicit-constexpr" }
+		lappend option_list "${std_prefix}$x"
+	    }
+	} else {
+	    verbose "using -std option specified in [file tail $test]" 2
+	    set option_list { "" }
+	}
+
+	set nshort [file tail [file dirname $test]]/[file tail $test]
+
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
+	}
+    }
+}
+
+
 # True if the library supports wchar_t.
 set v3-wchar_t 0
 
diff --git a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
index 32d6f69fe89..76679739823 100644
--- a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
+++ b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
@@ -108,7 +108,8 @@ set tests [lsort $tests]
 # Main loop.
 global DEFAULT_CXXFLAGS
 global PCH_CXXFLAGS
-dg-runtest $tests "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
+# Modified version of dg-runtest
+v3-dg-runtest $tests "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
 
 # Finally run simd tests with extra SIMD-relevant flags
 global DEFAULT_VECTCFLAGS
-- 
2.41.0


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

* [PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 01/13] " Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 03/13] libstdc++: Replace dg-options "-std=c++17" " Jonathan Wakely
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

These tests can (and should) also be run for later standards, so replace
the { dg-options "-std=c++11" } with { dg-add-options strict_std } and a
target selector for c++11.

libstdc++-v3/ChangeLog:

	* testsuite/23_containers/deque/48101-2_neg.cc: Replace
	dg-options with target selector.
	* testsuite/23_containers/forward_list/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/list/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/map/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/map/48101_neg.cc: Likewise.
	* testsuite/23_containers/multimap/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/multimap/48101_neg.cc: Likewise.
	* testsuite/23_containers/multiset/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/set/48101-2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/48101-2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/48101-2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/48101-2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/48101-2_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/48101-2_neg.cc: Likewise.
---
 libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc     | 4 ++--
 .../testsuite/23_containers/forward_list/48101-2_neg.cc       | 4 ++--
 libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc      | 4 ++--
 libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc       | 4 ++--
 libstdc++-v3/testsuite/23_containers/map/48101_neg.cc         | 3 +--
 libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc  | 4 ++--
 libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc    | 3 +--
 libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc  | 4 ++--
 libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc       | 4 ++--
 .../testsuite/23_containers/unordered_map/48101-2_neg.cc      | 4 ++--
 .../testsuite/23_containers/unordered_multimap/48101-2_neg.cc | 4 ++--
 .../testsuite/23_containers/unordered_multiset/48101-2_neg.cc | 4 ++--
 .../testsuite/23_containers/unordered_set/48101-2_neg.cc      | 4 ++--
 libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc    | 4 ++--
 14 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc
index 041f0cb88b3..d5cb13ec4db 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <deque>
 
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc
index 2a21876c1cf..d5cc81c6b48 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <forward_list>
 
diff --git a/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc
index 0e96022cdfe..5cea21992d9 100644
--- a/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <list>
 
diff --git a/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc
index 06c4dc9e9ef..8cda993e2cb 100644
--- a/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc
index e9029caad21..81837954125 100644
--- a/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
 
 #include <map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc
index fd77071a2a5..6022039e004 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc
index 942a5aaf2ff..55626edfc2d 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
 
 #include <map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc
index c1c1f64d6c5..619b97ee4a5 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <set>
 
diff --git a/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc
index 6466b38901d..d83a08c9856 100644
--- a/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <set>
 
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc
index 8ea74e6c04b..c45ef0daa50 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <unordered_map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc
index 38afec91b34..39eeb0f76d8 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <unordered_map>
 
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc
index 389cb947cbe..006716e0d69 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <unordered_set>
 
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc
index 08ef3b587a4..ed5a7787525 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <unordered_set>
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc
index ed5111224e9..0dd75956ce6 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-add-options strict_std }
 
 #include <vector>
 
-- 
2.41.0


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

* [PATCH 03/13] libstdc++: Replace dg-options "-std=c++17" with dg-add-options strict_std
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 01/13] " Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" " Jonathan Wakely
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

These tests can (and should) also be run for later standards, so replace
the { dg-options "-std=c++17" } with { dg-add-options strict_std }.

	* testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc:
	Replace dg-options -std=c++17 with dg-add-options strict_std.
	* testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc:
	Likewise.
---
 .../special_functions/07_conf_hyperg/compile_cxx17.cc           | 2 +-
 .../special_functions/17_hyperg/compile_cxx17.cc                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc
index 60264ebe3dd..a10ba8e517b 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++17" }
 // { dg-do compile { target c++17 } }
+// { dg-add-options strict_std }
 
 #include <tr1/cmath>
 
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc
index 40ea47c1ca4..91a55883f64 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++17" }
 // { dg-do compile { target c++17 } }
+// { dg-add-options strict_std }
 
 #include <tr1/cmath>
 
-- 
2.41.0


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

* [PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (2 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 03/13] libstdc++: Replace dg-options "-std=c++17" " Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 05/13] libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests Jonathan Wakely
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well. Because they test a problem seen with -std=c++20 add
the new { dg-add-options strict_std } directive so that the test runner
uses -std=c++NN not -std=gnu++NN.

libstdc++-v3/ChangeLog:

	* testsuite/24_iterators/reverse_iterator/100639.cc: Remove
	dg-options and add dg-add-options strict_std.
	* testsuite/std/ranges/iota/93267.cc: Likewise.
	* testsuite/std/ranges/iota/96042.cc: Likewise.
	* testsuite/std/ranges/iota/size.cc: Likewise.
	* testsuite/std/ranges/subrange/96042.cc: Likewise.
---
 .../testsuite/24_iterators/reverse_iterator/100639.cc         | 4 ++--
 libstdc++-v3/testsuite/std/ranges/iota/93267.cc               | 4 ++--
 libstdc++-v3/testsuite/std/ranges/iota/96042.cc               | 4 ++--
 libstdc++-v3/testsuite/std/ranges/iota/size.cc                | 2 +-
 libstdc++-v3/testsuite/std/ranges/subrange/96042.cc           | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc
index 5d0a7f4af27..68bf4e08488 100644
--- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc
+++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 // PR libstdc++/100639
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/93267.cc b/libstdc++-v3/testsuite/std/ranges/iota/93267.cc
index 3bb74bbf485..4306aea4d43 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/93267.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/93267.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/96042.cc b/libstdc++-v3/testsuite/std/ranges/iota/96042.cc
index 7070a7d6b10..6c553de9ce9 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/96042.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/96042.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/size.cc b/libstdc++-v3/testsuite/std/ranges/iota/size.cc
index 958cb5f03c8..28848d55561 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/size.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/size.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
 // { dg-do compile { target c++2a } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc b/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc
index bc22f999ed8..3856952eeb3 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++20" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>
-- 
2.41.0


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

* [PATCH 05/13] libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (3 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" " Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests Jonathan Wakely
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

There doesn't seem to be any reason they need to use strict -std=c++20
mode, so don't add the { dg-add-options strict_std } directive, just let
them use strict or non-strict modes.

libstdc++-v3/ChangeLog:

	* testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
	Remove dg-options.
	* testsuite/23_containers/span/contiguous_range_neg.cc:
	Likewise.
	* testsuite/23_containers/span/everything.cc: Likewise.
---
 .../testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc | 1 -
 .../testsuite/23_containers/span/contiguous_range_neg.cc       | 3 +--
 libstdc++-v3/testsuite/23_containers/span/everything.cc        | 3 +--
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc b/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc
index df68fb7c82f..1964803cbd1 100644
--- a/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc
+++ b/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=c++20" }
 // { dg-do compile { target c++20 } }
 
 #include <cuchar>
diff --git a/libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc b/libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc
index d5f64922052..2ed44740a86 100644
--- a/libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 #include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/span/everything.cc b/libstdc++-v3/testsuite/23_containers/span/everything.cc
index 74f943e937f..31c17346dd3 100644
--- a/libstdc++-v3/testsuite/23_containers/span/everything.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/everything.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <testsuite_hooks.h>
 
-- 
2.41.0


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

* [PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (4 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 05/13] libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-15 20:54   ` [PATCH v2 6/13] " Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 07/13] libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests Jonathan Wakely
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

	* testsuite/std/concepts/1.cc: Remove dg-options.
	* testsuite/std/concepts/2.cc: Likewise.
	* testsuite/std/concepts/concepts.callable/invocable.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/regular_invocable.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/relation.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/strictweakorder.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.assignable/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.common/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.commonref/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.constructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.destructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.same/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc: Likewise.
	* testsuite/std/concepts/concepts.object/copyable.cc: Likewise.
	* testsuite/std/concepts/concepts.object/movable.cc: Likewise.
	* testsuite/std/concepts/concepts.object/regular.cc: Likewise.
	* testsuite/std/concepts/concepts.object/semiregular.cc:
	Likewise.
	* testsuite/std/ranges/97600.cc: Likewise.
	* testsuite/std/ranges/access/101782.cc: Likewise.
	* testsuite/std/ranges/access/begin.cc: Likewise.
	* testsuite/std/ranges/access/begin_neg.cc: Likewise.
	* testsuite/std/ranges/access/cbegin.cc: Likewise.
	* testsuite/std/ranges/access/cdata.cc: Likewise.
	* testsuite/std/ranges/access/cend.cc: Likewise.
	* testsuite/std/ranges/access/crbegin.cc: Likewise.
	* testsuite/std/ranges/access/crend.cc: Likewise.
	* testsuite/std/ranges/access/data.cc: Likewise.
	* testsuite/std/ranges/access/empty.cc: Likewise.
	* testsuite/std/ranges/access/end.cc: Likewise.
	* testsuite/std/ranges/access/end_neg.cc: Likewise.
	* testsuite/std/ranges/access/lwg3467.cc: Likewise.
	* testsuite/std/ranges/access/p2602.cc: Likewise.
	* testsuite/std/ranges/access/rbegin.cc: Likewise.
	* testsuite/std/ranges/access/rend.cc: Likewise.
	* testsuite/std/ranges/access/size.cc: Likewise.
	* testsuite/std/ranges/access/size_neg.cc: Likewise.
	* testsuite/std/ranges/access/ssize.cc: Likewise.
	* testsuite/std/ranges/adaptors/100479.cc: Likewise.
	* testsuite/std/ranges/adaptors/100577.cc: Likewise.
	* testsuite/std/ranges/adaptors/93978.cc: Likewise.
	* testsuite/std/ranges/adaptors/95322.cc: Likewise.
	* testsuite/std/ranges/adaptors/99433.cc: Likewise.
	* testsuite/std/ranges/adaptors/all.cc: Likewise.
	* testsuite/std/ranges/adaptors/common.cc: Likewise.
	* testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/counted.cc: Likewise.
	* testsuite/std/ranges/adaptors/detail/copyable_box.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/drop.cc: Likewise.
	* testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
	* testsuite/std/ranges/adaptors/elements.cc: Likewise.
	* testsuite/std/ranges/adaptors/filter.cc: Likewise.
	* testsuite/std/ranges/adaptors/join.cc: Likewise.
	* testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
	* testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3286.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3313_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3325_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3406.cc: Likewise.
	* testsuite/std/ranges/adaptors/p1739.cc: Likewise.
	* testsuite/std/ranges/adaptors/p2281.cc: Likewise.
	* testsuite/std/ranges/adaptors/p2770r0.cc: Likewise.
	* testsuite/std/ranges/adaptors/reverse.cc: Likewise.
	* testsuite/std/ranges/adaptors/sizeof.cc: Likewise.
	* testsuite/std/ranges/adaptors/split.cc: Likewise.
	* testsuite/std/ranges/adaptors/take.cc: Likewise.
	* testsuite/std/ranges/adaptors/take_while.cc: Likewise.
	* testsuite/std/ranges/adaptors/transform.cc: Likewise.
	* testsuite/std/ranges/empty_view.cc: Likewise.
	* testsuite/std/ranges/headers/ranges/synopsis.cc: Likewise.
	* testsuite/std/ranges/iota/difference_type.cc: Likewise.
	* testsuite/std/ranges/iota/iota_view.cc: Likewise.
	* testsuite/std/ranges/iota/iterator.cc: Likewise.
	* testsuite/std/ranges/iota/lwg3292_neg.cc: Likewise.
	* testsuite/std/ranges/iota/max_size_type.cc: Likewise.
	* testsuite/std/ranges/istream_view.cc: Likewise.
	* testsuite/std/ranges/p2259.cc: Likewise.
	* testsuite/std/ranges/p2367.cc: Likewise.
	* testsuite/std/ranges/range.cc: Likewise.
	* testsuite/std/ranges/refinements.cc: Likewise.
	* testsuite/std/ranges/safe_range.cc: Likewise.
	* testsuite/std/ranges/safe_range_types.cc: Likewise.
	* testsuite/std/ranges/single_view.cc: Likewise.
	* testsuite/std/ranges/sized.cc: Likewise.
	* testsuite/std/ranges/subrange/97512.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3282_neg.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3286.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3433.cc: Likewise.
	* testsuite/std/ranges/subrange/sizeof.cc: Likewise.
	* testsuite/std/ranges/subrange/tuple_like.cc: Likewise.
	* testsuite/std/ranges/view.cc: Likewise.
---
 libstdc++-v3/testsuite/std/concepts/1.cc                   | 3 +--
 libstdc++-v3/testsuite/std/concepts/2.cc                   | 3 +--
 .../testsuite/std/concepts/concepts.callable/invocable.cc  | 3 +--
 .../std/concepts/concepts.callable/regular_invocable.cc    | 3 +--
 .../testsuite/std/concepts/concepts.callable/relation.cc   | 3 +--
 .../std/concepts/concepts.callable/strictweakorder.cc      | 3 +--
 .../concepts.lang/concept.arithmetic/floating_point.cc     | 3 +--
 .../concepts/concepts.lang/concept.arithmetic/integral.cc  | 3 +--
 .../concepts.lang/concept.arithmetic/signed_integral.cc    | 3 +--
 .../concepts.lang/concept.arithmetic/unsigned_integral.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.assignable/1.cc     | 3 +--
 .../std/concepts/concepts.lang/concept.common/1.cc         | 3 +--
 .../std/concepts/concepts.lang/concept.commonref/1.cc      | 3 +--
 .../std/concepts/concepts.lang/concept.constructible/1.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.convertible/1.cc    | 3 +--
 .../concepts/concepts.lang/concept.copyconstructible/1.cc  | 3 +--
 .../concepts.lang/concept.defaultinitializable/1.cc        | 3 +--
 .../concepts.lang/concept.defaultinitializable/lwg3149.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.derived/1.cc        | 3 +--
 .../std/concepts/concepts.lang/concept.destructible/1.cc   | 3 +--
 .../concepts/concepts.lang/concept.moveconstructible/1.cc  | 3 +--
 .../testsuite/std/concepts/concepts.lang/concept.same/1.cc | 3 +--
 .../std/concepts/concepts.lang/concept.swappable/swap.cc   | 3 +--
 .../concepts/concepts.lang/concept.swappable/swappable.cc  | 3 +--
 .../concepts.lang/concept.swappable/swappable_with.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/copyable.cc     | 3 +--
 .../testsuite/std/concepts/concepts.object/movable.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/regular.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/semiregular.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/97600.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/101782.cc         | 2 +-
 libstdc++-v3/testsuite/std/ranges/access/begin.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cbegin.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cdata.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cend.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/crbegin.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/crend.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/data.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/empty.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/end.cc            | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/end_neg.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/p2602.cc          | 1 -
 libstdc++-v3/testsuite/std/ranges/access/rbegin.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/rend.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/size.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/size_neg.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/ssize.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/all.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/common.cc       | 3 +--
 .../std/ranges/adaptors/conditionally_borrowed.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc      | 3 +--
 .../testsuite/std/ranges/adaptors/detail/copyable_box.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc     | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/join.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc   | 3 +--
 .../testsuite/std/ranges/adaptors/lazy_split_neg.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc        | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc      | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/split.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/take.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc    | 3 +--
 libstdc++-v3/testsuite/std/ranges/empty_view.cc            | 3 +--
 .../testsuite/std/ranges/headers/ranges/synopsis.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/iterator.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc    | 3 +--
 libstdc++-v3/testsuite/std/ranges/istream_view.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/p2259.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/p2367.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/range.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/refinements.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/safe_range.cc            | 3 +--
 libstdc++-v3/testsuite/std/ranges/safe_range_types.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/single_view.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/sized.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/97512.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc  | 7 +++----
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/view.cc                  | 3 +--
 102 files changed, 101 insertions(+), 202 deletions(-)

diff --git a/libstdc++-v3/testsuite/std/concepts/1.cc b/libstdc++-v3/testsuite/std/concepts/1.cc
index add7b0e83b4..0301b91e869 100644
--- a/libstdc++-v3/testsuite/std/concepts/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do preprocess { target c++2a } }
+// { dg-do preprocess { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/2.cc b/libstdc++-v3/testsuite/std/concepts/2.cc
index 0098a2e2f85..53a1e006993 100644
--- a/libstdc++-v3/testsuite/std/concepts/2.cc
+++ b/libstdc++-v3/testsuite/std/concepts/2.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do preprocess { target c++2a } }
+// { dg-do preprocess { target c++20 } }
 
 #include <version>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
index bb9849b196f..9a19854746f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
index a18fbfc3c1a..98f58f9864b 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
index 75cbbdf96db..6c3e182f19c 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
index b43d485161c..36861759984 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
index 15f892b76f6..96d9588f2b8 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
index b9cc5cd251e..53ea3e39433 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
index 6e18e916547..906a2bf7433 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
index 8578dc0b463..37e80fcd068 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
index b0aca56d944..fd45713558f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
index 4d6254c3d2c..6b7c32948c4 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
index 118ee8c4b58..f56e0b04878 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
index b66c286d67a..d6c985ea81f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
index cc2bc945458..eaa624e9c1d 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
index 9f6f3f77023..7d4a66fcf26 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
index 4a479742c1a..be020a9c97a 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
index 7f49a2a9647..53b3d1fd81a 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
index f877d53eb13..8624b3559f0 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
index 29ab5146544..2f915bc9ef2 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
index 26debdf0ab1..a540f91978e 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
index 7dbaa08281a..3537ed2beff 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
index 2bc7a434e0f..050270762e1 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
index d0487e04998..76e23e23e0e 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
index 90db5a91b54..5a956dc2d6c 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
index 3fab3d8e372..cece9109640 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
index e087a66a96c..16f39277627 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
index 3dcc66a3c2f..485dc42b2f4 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
index 633a9f1fe8c..0d1c9f78f1b 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/97600.cc b/libstdc++-v3/testsuite/std/ranges/97600.cc
index 7da0542b19e..569a4ef8e2e 100644
--- a/libstdc++-v3/testsuite/std/ranges/97600.cc
+++ b/libstdc++-v3/testsuite/std/ranges/97600.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/97600
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/101782.cc b/libstdc++-v3/testsuite/std/ranges/access/101782.cc
index abb0c8dab0f..25fea793355 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/101782.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/101782.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++20 -fconcepts-ts" }
+// { dg-options "-fconcepts-ts" }
 // { dg-do compile { target c++20 } }
 
 // PR testsuite/101782
diff --git a/libstdc++-v3/testsuite/std/ranges/access/begin.cc b/libstdc++-v3/testsuite/std/ranges/access/begin.cc
index 0bc09992666..ac813df32f1 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/begin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/begin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
index 0be7358e9a3..023ea0e9aef 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
index 3667b0d021f..0b53a6e6ff3 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cdata.cc b/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
index d69b04c8f74..69c9112d2ce 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cend.cc b/libstdc++-v3/testsuite/std/ranges/access/cend.cc
index 3726ebbf118..aa304fe4564 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
index 95b4607fdf1..04217164199 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/crend.cc b/libstdc++-v3/testsuite/std/ranges/access/crend.cc
index 2e4c0f3197a..5ef218bbbfa 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/crend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/crend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/data.cc b/libstdc++-v3/testsuite/std/ranges/access/data.cc
index 366db744440..1e3d6f20e89 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/data.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/data.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/empty.cc b/libstdc++-v3/testsuite/std/ranges/access/empty.cc
index 51898ec0c8f..a0b474c0bbe 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/empty.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/empty.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/end.cc b/libstdc++-v3/testsuite/std/ranges/access/end.cc
index 6c96b313dbb..f795e703439 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/end.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/end.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
index 6e19cbd59a7..7daeec0a9bc 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc b/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
index e5b3be093cb..6fed9029279 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // LWG 3467. bool can't be an integer-like type
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/p2602.cc b/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
index 9c6a0e6ee95..8c403c1c3b6 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 // P2602R2 Poison Pills are Too Toxic
diff --git a/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
index b7314b824ed..ad9deebedd0 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/rend.cc b/libstdc++-v3/testsuite/std/ranges/access/rend.cc
index d3d90418411..3e25c9037e0 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/rend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/rend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/size.cc b/libstdc++-v3/testsuite/std/ranges/access/size.cc
index e52e2968eb3..a5795a6b9dd 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/size.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/size.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
index 2cb85636fa1..446d833d6d1 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/ssize.cc b/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
index abc6997eebb..47021350dd6 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
index a8cb5036c60..8f5814c21b1 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // PR libstdc++/100479
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
index 59f8819c201..29fa07359c1 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/100577
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
index 256ee7f6774..9690a376408 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
 // { dg-additional-options "-O -Wall" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
index 792bbfff922..f5832768cdd 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++20" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
index c9fcc11e06e..bb86806ca01 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/99433
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
index 6bbaf73a20a..dadd08122ba 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
index 2e179c33592..8404317bf2c 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
index 0f813d34481..77b802a105f 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
index d99e9628507..89fea4643d5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
index 209ce3ec3ee..dbc1fd23412 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
index 2c4047dbaa3..4f4030c46a5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
index 5022e52b346..0d3a88da118 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
index 1b49282a206..05ccec49b01 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
index 2ad365327ea..9a9b2ac34d9 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
index 7401d69b30d..377b771eb3e 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
index 4e5c0dc3ed5..5895b7e851a 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
index 6c6fe1703f5..cd569bbf972 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
index e30945fbf18..1c1c590b866 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
index 2fe119efbe3..d0a07c7bdb7 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <array>
 #include <iterator>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
index 24e7e5cff9b..60960a57267 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
index 68d41b49d4a..7e87fb6fa31 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
index a1e66738789..d9188ba8866 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
index 2025ddb1459..3785c88a5b5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
index 15d71b2faa9..e754da4562b 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
index b07883eeaa9..647f4ccd5b6 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
index f420afc46a0..2efb53fd785 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
index d49d594d570..1d96269ac96 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
index a1f6068bc09..91c62619774 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <forward_list>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
index 098091edc8b..7476b8f6997 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <forward_list>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
index d9801d5abb3..b6d49810bc7 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/empty_view.cc b/libstdc++-v3/testsuite/std/ranges/empty_view.cc
index ea5a106d106..21ea3058c8c 100644
--- a/libstdc++-v3/testsuite/std/ranges/empty_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/empty_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
index 67af2f867c9..dfa3fcaa37e 100644
--- a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
+++ b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc b/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
index 0af3cdc56e8..9375492832b 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc b/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
index 0d2eaf1d0c2..134e20f3062 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc b/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
index 4b2ac3af47a..7ae5b2edebe 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc b/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
index f15d8aa3229..ea7721f5c43 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <sstream>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc b/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
index 54c26ba2b4b..a1fbc3241dc 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-timeout-factor 4 }
 
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/istream_view.cc b/libstdc++-v3/testsuite/std/ranges/istream_view.cc
index cc1c3e006b9..14ec85a4048 100644
--- a/libstdc++-v3/testsuite/std/ranges/istream_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/istream_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/p2259.cc b/libstdc++-v3/testsuite/std/ranges/p2259.cc
index 0e816bd7157..fb0de984a1a 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2259.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2259.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Verify P2259 changes.
 
diff --git a/libstdc++-v3/testsuite/std/ranges/p2367.cc b/libstdc++-v3/testsuite/std/ranges/p2367.cc
index 13bd2c9bc53..9a034a313dd 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2367.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2367.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Verify P2367 changes.
 
diff --git a/libstdc++-v3/testsuite/std/ranges/range.cc b/libstdc++-v3/testsuite/std/ranges/range.cc
index f721ec38718..728fd66b2d2 100644
--- a/libstdc++-v3/testsuite/std/ranges/range.cc
+++ b/libstdc++-v3/testsuite/std/ranges/range.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/refinements.cc b/libstdc++-v3/testsuite/std/ranges/refinements.cc
index 582bf62e805..27351d0adc7 100644
--- a/libstdc++-v3/testsuite/std/ranges/refinements.cc
+++ b/libstdc++-v3/testsuite/std/ranges/refinements.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/safe_range.cc b/libstdc++-v3/testsuite/std/ranges/safe_range.cc
index bdebfe8e235..fc3bdd0b630 100644
--- a/libstdc++-v3/testsuite/std/ranges/safe_range.cc
+++ b/libstdc++-v3/testsuite/std/ranges/safe_range.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc b/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
index fc43871f847..c123afc5681 100644
--- a/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
+++ b/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <span>
diff --git a/libstdc++-v3/testsuite/std/ranges/single_view.cc b/libstdc++-v3/testsuite/std/ranges/single_view.cc
index 8dfe6bb4bd1..336e3bcb215 100644
--- a/libstdc++-v3/testsuite/std/ranges/single_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/single_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/sized.cc b/libstdc++-v3/testsuite/std/ranges/sized.cc
index 17bbd082e22..9a9ef9cd4e4 100644
--- a/libstdc++-v3/testsuite/std/ranges/sized.cc
+++ b/libstdc++-v3/testsuite/std/ranges/sized.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc b/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
index c4b1ef7ed99..184feabbde8 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/97512
 // Check that structured bindings work for subranges without <ranges>.
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
index dafaf25a6f9..c7d93a45f26 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
@@ -36,9 +35,9 @@ test_lwg3404()
   // LWG 3404. Finish removing subrange's conversions from pair-like
   std::pair<char*, char*> p;
   subrange sb1(p);			// { dg-error "no matching function" }
-  // { dg-error "class template argument deduction" "" { target *-*-* } 38 }
+  // { dg-error "class template argument deduction" "" { target *-*-* } 37 }
   subrange sb2(p, p.second - p.first);	// { dg-error "no matching function" }
-  // { dg-error "class template argument deduction" "" { target *-*-* } 40 }
+  // { dg-error "class template argument deduction" "" { target *-*-* } 39 }
 
   // { dg-prune-output "in requirements with" }
 }
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
index c46523ca768..f4dc233fbee 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
index 559c5bca236..c7a33c83cdf 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc b/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
index 1e7c7c10e49..7d3a4eb0c32 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <iterator>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc b/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
index c3450fe9020..742fdc45c2e 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/view.cc b/libstdc++-v3/testsuite/std/ranges/view.cc
index 94e285b30ee..bfc52ffcd82 100644
--- a/libstdc++-v3/testsuite/std/ranges/view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <span>
-- 
2.41.0


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

* [PATCH 07/13] libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (5 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 08/13] libstdc++: Remove dg-options "-std=gnu++20" from std::format tests Jonathan Wakely
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/function_objects/range.cmp/equal_to.cc:
	Remove dg-options.
	* testsuite/20_util/function_objects/range.cmp/greater.cc:
	Likewise.
	* testsuite/20_util/function_objects/range.cmp/greater_equal.cc:
	Likewise.
	* testsuite/20_util/function_objects/range.cmp/less.cc:
	Likewise.
	* testsuite/20_util/function_objects/range.cmp/less_equal.cc:
	Likewise.
	* testsuite/20_util/function_objects/range.cmp/lwg3530.cc:
	Likewise.
	* testsuite/20_util/function_objects/range.cmp/not_equal_to.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/construct_at/1.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
	Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/adjacent_find/constexpr.cc: Likewise.
	* testsuite/25_algorithms/adjacent_find/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/all_of/constexpr.cc: Likewise.
	* testsuite/25_algorithms/all_of/constrained.cc: Likewise.
	* testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
	* testsuite/25_algorithms/any_of/constrained.cc: Likewise.
	* testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
	* testsuite/25_algorithms/binary_search/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/clamp/constrained.cc: Likewise.
	* testsuite/25_algorithms/constexpr_macro.cc: Likewise.
	* testsuite/25_algorithms/copy/95578.cc: Likewise.
	* testsuite/25_algorithms/copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Likewise.
	* testsuite/25_algorithms/copy_backward/95578.cc: Likewise.
	* testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
	* testsuite/25_algorithms/copy_backward/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc:
	Likewise.
	* testsuite/25_algorithms/copy_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/copy_if/constrained.cc: Likewise.
	* testsuite/25_algorithms/copy_n/constexpr.cc: Likewise.
	* testsuite/25_algorithms/copy_n/constrained.cc: Likewise.
	* testsuite/25_algorithms/count/constexpr.cc: Likewise.
	* testsuite/25_algorithms/count/constrained.cc: Likewise.
	* testsuite/25_algorithms/count_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/count_if/constrained.cc: Likewise.
	* testsuite/25_algorithms/cpp_lib_constexpr.cc: Likewise.
	* testsuite/25_algorithms/equal/95578.cc: Likewise.
	* testsuite/25_algorithms/equal/constexpr.cc: Likewise.
	* testsuite/25_algorithms/equal/constexpr_neg.cc: Likewise.
	* testsuite/25_algorithms/equal/constrained.cc: Likewise.
	* testsuite/25_algorithms/equal/debug/constexpr_neg.cc:
	Likewise.
	* testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
	* testsuite/25_algorithms/equal_range/constrained.cc: Likewise.
	* testsuite/25_algorithms/fill/94017.cc: Likewise.
	* testsuite/25_algorithms/fill/constexpr.cc: Likewise.
	* testsuite/25_algorithms/fill/constrained.cc: Likewise.
	* testsuite/25_algorithms/fill_n/94017.cc: Likewise.
	* testsuite/25_algorithms/fill_n/constexpr.cc: Likewise.
	* testsuite/25_algorithms/fill_n/constrained.cc: Likewise.
	* testsuite/25_algorithms/find/constexpr.cc: Likewise.
	* testsuite/25_algorithms/find/constrained.cc: Likewise.
	* testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
	* testsuite/25_algorithms/find_end/constrained.cc: Likewise.
	* testsuite/25_algorithms/find_first_of/constexpr.cc: Likewise.
	* testsuite/25_algorithms/find_first_of/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/find_if/constrained.cc: Likewise.
	* testsuite/25_algorithms/find_if_not/constexpr.cc: Likewise.
	* testsuite/25_algorithms/find_if_not/constrained.cc: Likewise.
	* testsuite/25_algorithms/for_each/constexpr.cc: Likewise.
	* testsuite/25_algorithms/for_each/constrained.cc: Likewise.
	* testsuite/25_algorithms/generate/constexpr.cc: Likewise.
	* testsuite/25_algorithms/generate/constrained.cc: Likewise.
	* testsuite/25_algorithms/generate_n/constexpr.cc: Likewise.
	* testsuite/25_algorithms/generate_n/constrained.cc: Likewise.
	* testsuite/25_algorithms/heap/constrained.cc: Likewise.
	* testsuite/25_algorithms/includes/constrained.cc: Likewise.
	* testsuite/25_algorithms/inplace_merge/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
	* testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
	* testsuite/25_algorithms/is_partitioned/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
	* testsuite/25_algorithms/is_permutation/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
	* testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
	* testsuite/25_algorithms/is_sorted_until/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/is_sorted_until/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/iter_swap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/lexicographical_compare/93972.cc:
	Likewise.
	* testsuite/25_algorithms/lexicographical_compare/95578.cc:
	Likewise.
	* testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/lexicographical_compare/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
	Likewise.
	* testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/constrained.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc:
	Likewise.
	* testsuite/25_algorithms/make_heap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/max/constrained.cc: Likewise.
	* testsuite/25_algorithms/max_element/constrained.cc: Likewise.
	* testsuite/25_algorithms/merge/constexpr.cc: Likewise.
	* testsuite/25_algorithms/merge/constrained.cc: Likewise.
	* testsuite/25_algorithms/min/constrained.cc: Likewise.
	* testsuite/25_algorithms/min_element/constrained.cc: Likewise.
	* testsuite/25_algorithms/minmax/constrained.cc: Likewise.
	* testsuite/25_algorithms/minmax_element/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
	* testsuite/25_algorithms/mismatch/constrained.cc: Likewise.
	* testsuite/25_algorithms/move/93872.cc: Likewise.
	* testsuite/25_algorithms/move/95578.cc: Likewise.
	* testsuite/25_algorithms/move/constexpr.cc: Likewise.
	* testsuite/25_algorithms/move/constrained.cc: Likewise.
	* testsuite/25_algorithms/move_backward/93872.cc: Likewise.
	* testsuite/25_algorithms/move_backward/95578.cc: Likewise.
	* testsuite/25_algorithms/move_backward/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/next_permutation/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/next_permutation/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
	* testsuite/25_algorithms/none_of/constrained.cc: Likewise.
	* testsuite/25_algorithms/nth_element/constexpr.cc: Likewise.
	* testsuite/25_algorithms/nth_element/constrained.cc: Likewise.
	* testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
	* testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
	* testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/partial_sort_copy/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/partition/constexpr.cc: Likewise.
	* testsuite/25_algorithms/partition/constrained.cc: Likewise.
	* testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/partition_copy/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/partition_point/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/partition_point/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/pop_heap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/prev_permutation/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/prev_permutation/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/push_heap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/remove/constexpr.cc: Likewise.
	* testsuite/25_algorithms/remove/constrained.cc: Likewise.
	* testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/remove_copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/remove_copy_if/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/remove_if/constrained.cc: Likewise.
	* testsuite/25_algorithms/replace/constrained.cc: Likewise.
	* testsuite/25_algorithms/replace_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/replace_copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/replace_copy_if/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/replace_copy_if/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
	* testsuite/25_algorithms/replace_if/constrained.cc: Likewise.
	* testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
	* testsuite/25_algorithms/reverse/constrained.cc: Likewise.
	* testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/reverse_copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/rotate/constexpr.cc: Likewise.
	* testsuite/25_algorithms/rotate/constrained.cc: Likewise.
	* testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/rotate_copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/sample/constrained.cc: Likewise.
	* testsuite/25_algorithms/search/constexpr.cc: Likewise.
	* testsuite/25_algorithms/search/constrained.cc: Likewise.
	* testsuite/25_algorithms/search_n/97828.cc: Likewise.
	* testsuite/25_algorithms/search_n/constexpr.cc: Likewise.
	* testsuite/25_algorithms/search_n/constrained.cc: Likewise.
	* testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
	* testsuite/25_algorithms/set_difference/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/set_intersection/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/set_intersection/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
	Likewise.
	* testsuite/25_algorithms/set_symmetric_difference/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
	* testsuite/25_algorithms/set_union/constrained.cc: Likewise.
	* testsuite/25_algorithms/shift_left/1.cc: Likewise.
	* testsuite/25_algorithms/shift_right/1.cc: Likewise.
	* testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
	* testsuite/25_algorithms/sort/constexpr.cc: Likewise.
	* testsuite/25_algorithms/sort/constrained.cc: Likewise.
	* testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/stable_partition/constrained.cc:
	Likewise.
	* testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
	* testsuite/25_algorithms/swap/constexpr.cc: Likewise.
	* testsuite/25_algorithms/swap_ranges/constexpr.cc: Likewise.
	* testsuite/25_algorithms/swap_ranges/constrained.cc: Likewise.
	* testsuite/25_algorithms/transform/constexpr.cc: Likewise.
	* testsuite/25_algorithms/transform/constrained.cc: Likewise.
	* testsuite/25_algorithms/unique/constexpr.cc: Likewise.
	* testsuite/25_algorithms/unique/constrained.cc: Likewise.
	* testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
	* testsuite/25_algorithms/unique_copy/constrained.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/constrained.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc:
	Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc:
	Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc:
	Likewise.
---
 .../testsuite/20_util/function_objects/range.cmp/equal_to.cc   | 3 +--
 .../testsuite/20_util/function_objects/range.cmp/greater.cc    | 3 +--
 .../20_util/function_objects/range.cmp/greater_equal.cc        | 3 +--
 .../testsuite/20_util/function_objects/range.cmp/less.cc       | 3 +--
 .../testsuite/20_util/function_objects/range.cmp/less_equal.cc | 3 +--
 .../testsuite/20_util/function_objects/range.cmp/lwg3530.cc    | 1 -
 .../20_util/function_objects/range.cmp/not_equal_to.cc         | 3 +--
 .../testsuite/20_util/specialized_algorithms/construct_at/1.cc | 3 +--
 .../20_util/specialized_algorithms/construct_at/92878_92947.cc | 3 +--
 .../20_util/specialized_algorithms/construct_at/95788.cc       | 3 +--
 .../20_util/specialized_algorithms/destroy/constrained.cc      | 3 +--
 .../specialized_algorithms/uninitialized_copy/constrained.cc   | 3 +--
 .../uninitialized_default_construct/constrained.cc             | 3 +--
 .../20_util/specialized_algorithms/uninitialized_fill/94017.cc | 3 +--
 .../specialized_algorithms/uninitialized_fill/constrained.cc   | 3 +--
 .../specialized_algorithms/uninitialized_fill_n/94017.cc       | 3 +--
 .../specialized_algorithms/uninitialized_move/constrained.cc   | 3 +--
 .../uninitialized_value_construct/constrained.cc               | 3 +--
 .../testsuite/25_algorithms/adjacent_find/constexpr.cc         | 3 +--
 .../testsuite/25_algorithms/adjacent_find/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/all_of/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/any_of/constrained.cc     | 3 +--
 .../testsuite/25_algorithms/binary_search/constexpr.cc         | 3 +--
 .../testsuite/25_algorithms/binary_search/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy/95578.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc       | 3 +--
 .../testsuite/25_algorithms/copy/debug/constexpr_neg.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy_backward/95578.cc    | 3 +--
 .../testsuite/25_algorithms/copy_backward/constexpr.cc         | 3 +--
 .../testsuite/25_algorithms/copy_backward/constrained.cc       | 3 +--
 .../25_algorithms/copy_backward/debug/constexpr_neg.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy_if/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/copy_n/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/count/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/count_if/constrained.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/equal/95578.cc            | 3 +--
 libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/equal/constexpr_neg.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/equal/constrained.cc      | 3 +--
 .../testsuite/25_algorithms/equal/debug/constexpr_neg.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/equal_range/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill/94017.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill_n/94017.cc           | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/fill_n/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find_end/constrained.cc   | 3 +--
 .../testsuite/25_algorithms/find_first_of/constexpr.cc         | 3 +--
 .../testsuite/25_algorithms/find_first_of/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find_if/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/find_if_not/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/generate/constrained.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/generate_n/constrained.cc | 3 +--
 libstdc++-v3/testsuite/25_algorithms/heap/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/includes/constrained.cc   | 3 +--
 .../testsuite/25_algorithms/inplace_merge/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc      | 3 +--
 .../testsuite/25_algorithms/is_heap_until/constexpr.cc         | 3 +--
 .../testsuite/25_algorithms/is_partitioned/constexpr.cc        | 3 +--
 .../testsuite/25_algorithms/is_partitioned/constrained.cc      | 3 +--
 .../testsuite/25_algorithms/is_permutation/constexpr.cc        | 3 +--
 .../testsuite/25_algorithms/is_permutation/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc  | 3 +--
 .../testsuite/25_algorithms/is_sorted_until/constexpr.cc       | 3 +--
 .../testsuite/25_algorithms/is_sorted_until/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc    | 3 +--
 .../testsuite/25_algorithms/lexicographical_compare/93972.cc   | 3 +--
 .../testsuite/25_algorithms/lexicographical_compare/95578.cc   | 3 +--
 .../25_algorithms/lexicographical_compare/constexpr.cc         | 3 +--
 .../25_algorithms/lexicographical_compare/constrained.cc       | 3 +--
 .../25_algorithms/lexicographical_compare_three_way/1.cc       | 3 +--
 .../lexicographical_compare_three_way/constexpr.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/lower_bound/constrained.cc         | 3 +--
 .../lower_bound/debug/constexpr_partitioned_neg.cc             | 3 +--
 .../lower_bound/debug/constexpr_partitioned_pred_neg.cc        | 3 +--
 .../lower_bound/debug/constexpr_valid_range_neg.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/max/constrained.cc        | 3 +--
 .../testsuite/25_algorithms/max_element/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/merge/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/min/constrained.cc        | 3 +--
 .../testsuite/25_algorithms/min_element/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc     | 3 +--
 .../testsuite/25_algorithms/minmax_element/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/mismatch/constrained.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/move/93872.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/move/95578.cc             | 3 +--
 libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc         | 1 -
 libstdc++-v3/testsuite/25_algorithms/move/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/move_backward/93872.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/move_backward/95578.cc    | 3 +--
 .../testsuite/25_algorithms/move_backward/constrained.cc       | 3 +--
 .../testsuite/25_algorithms/next_permutation/constexpr.cc      | 3 +--
 .../testsuite/25_algorithms/next_permutation/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/none_of/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/nth_element/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc | 3 +--
 .../testsuite/25_algorithms/partial_sort/constrained.cc        | 3 +--
 .../testsuite/25_algorithms/partial_sort_copy/constexpr.cc     | 3 +--
 .../testsuite/25_algorithms/partial_sort_copy/constrained.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/partition/constrained.cc  | 3 +--
 .../testsuite/25_algorithms/partition_copy/constexpr.cc        | 3 +--
 .../testsuite/25_algorithms/partition_copy/constrained.cc      | 3 +--
 .../testsuite/25_algorithms/partition_point/constexpr.cc       | 3 +--
 .../testsuite/25_algorithms/partition_point/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc     | 3 +--
 .../testsuite/25_algorithms/prev_permutation/constexpr.cc      | 3 +--
 .../testsuite/25_algorithms/prev_permutation/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/remove/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/remove_copy/constrained.cc         | 3 +--
 .../testsuite/25_algorithms/remove_copy_if/constexpr.cc        | 3 +--
 .../testsuite/25_algorithms/remove_copy_if/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/remove_if/constrained.cc  | 3 +--
 libstdc++-v3/testsuite/25_algorithms/replace/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc | 3 +--
 .../testsuite/25_algorithms/replace_copy/constrained.cc        | 3 +--
 .../testsuite/25_algorithms/replace_copy_if/constexpr.cc       | 3 +--
 .../testsuite/25_algorithms/replace_copy_if/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc   | 3 +--
 libstdc++-v3/testsuite/25_algorithms/replace_if/constrained.cc | 3 +--
 libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/reverse/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc | 3 +--
 .../testsuite/25_algorithms/reverse_copy/constrained.cc        | 3 +--
 libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/rotate/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/rotate_copy/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/search/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/search_n/97828.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/search_n/constrained.cc   | 3 +--
 .../testsuite/25_algorithms/set_difference/constexpr.cc        | 3 +--
 .../testsuite/25_algorithms/set_difference/constrained.cc      | 3 +--
 .../testsuite/25_algorithms/set_intersection/constexpr.cc      | 3 +--
 .../testsuite/25_algorithms/set_intersection/constrained.cc    | 3 +--
 .../25_algorithms/set_symmetric_difference/constexpr.cc        | 3 +--
 .../25_algorithms/set_symmetric_difference/constrained.cc      | 3 +--
 libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/set_union/constrained.cc  | 3 +--
 libstdc++-v3/testsuite/25_algorithms/shift_left/1.cc           | 3 +--
 libstdc++-v3/testsuite/25_algorithms/shift_right/1.cc          | 3 +--
 libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/sort/constrained.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc    | 3 +--
 .../testsuite/25_algorithms/stable_partition/constrained.cc    | 3 +--
 .../testsuite/25_algorithms/stable_sort/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/swap_ranges/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc    | 3 +--
 libstdc++-v3/testsuite/25_algorithms/transform/constrained.cc  | 3 +--
 libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc       | 3 +--
 libstdc++-v3/testsuite/25_algorithms/unique/constrained.cc     | 3 +--
 libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/unique_copy/constrained.cc         | 3 +--
 libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc  | 3 +--
 .../testsuite/25_algorithms/upper_bound/constrained.cc         | 3 +--
 .../upper_bound/debug/constexpr_partitioned_neg.cc             | 3 +--
 .../upper_bound/debug/constexpr_partitioned_pred_neg.cc        | 3 +--
 .../upper_bound/debug/constexpr_valid_range_neg.cc             | 3 +--
 196 files changed, 194 insertions(+), 390 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/equal_to.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/equal_to.cc
index 0a300447b03..c29bf02249a 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/equal_to.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/equal_to.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater.cc
index 3308735d02a..cd5a73d071c 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater_equal.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater_equal.cc
index aee97f16d66..46bc2e44946 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater_equal.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater_equal.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less.cc
index 185c3f8540b..472962fa863 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less_equal.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less_equal.cc
index d1877ee66e2..776220393c3 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less_equal.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less_equal.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/lwg3530.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/lwg3530.cc
index 369ff5465aa..858e8dbeba5 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/lwg3530.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/lwg3530.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/not_equal_to.cc b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/not_equal_to.cc
index 756eb65b55e..c42ebe7b1ad 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/not_equal_to.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/range.cmp/not_equal_to.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <functional>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/1.cc
index e00a53972bc..6fda8fc96c0 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/1.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <memory>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc
index d215d06f09b..33f52e0f780 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/95788.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/95788.cc
index bbf1c988d5f..7f6bfb04fa4 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/95788.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/95788.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // FIXME [!HOSTED]: avoidable std::allocator usage
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/destroy/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/destroy/constrained.cc
index 7d64a6a9eeb..0a0287f4284 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/destroy/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/destroy/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc
index 9885d444768..1dbfe0b45e2 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc
index 983abb2621a..4dabd25ac6c 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc
index dd3f8e8df31..dff67be3eee 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc
index 3b5c0a0a714..82e766baa73 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc
index fd26bf25636..e23efc9dc03 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc
index 23dcefdd3df..b38700c76fd 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc
index dd844797c00..7aa07d321c4 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <cstring>
diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc
index 1ba75b49ab9..501b5db1707 100644
--- a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constrained.cc
index 04845639d8e..bbb009079e5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc
index fd7ea0f853e..260d4886fa2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/all_of/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/all_of/constrained.cc
index 8da20d6e885..8c7d8f91db9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/all_of/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/all_of/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc
index d8f61043e47..4d30d987f4a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/any_of/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/any_of/constrained.cc
index 14e67d89dc7..8cf7f3c2109 100644
--- a/libstdc++-v3/testsuite/25_algorithms/any_of/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/any_of/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc
index 8e12d15cbba..2048abd9e25 100644
--- a/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/constrained.cc
index 1f3f92e66ac..b2c68812e0a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/binary_search/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc
index 990e5b740e4..37211f432b7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc b/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc
index e70605f46f5..d591b11bd5f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/95578.cc b/libstdc++-v3/testsuite/25_algorithms/copy/95578.cc
index 155d4b7daaa..92519ccaca4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc
index 1d7940c818e..5d12fe04807 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc
index 4f2e808fd58..06080862a5e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc
index bf3c4939bfb..d99a95ef7bd 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode ""  }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/95578.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/95578.cc
index 4426af94441..910a8b1756a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc
index c2ec568ebeb..efafa087a1e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constrained.cc
index fc3f87e6ed9..4bf13eff1cd 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc
index 6bf7f47055d..0077fb6e46b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode ""  }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc
index e3c2328751d..7f22f131618 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/copy_if/constrained.cc
index c35e343c685..d3772e89be0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc
index 39b0a6d4cb1..26dfd461357 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/constrained.cc
index 20abe04ee1e..cd7c91a6bdc 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy_n/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc
index 2bfb86b3504..4432778efec 100644
--- a/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/count/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/count/constrained.cc
index 09a26ddf7ea..8686e084186 100644
--- a/libstdc++-v3/testsuite/25_algorithms/count/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/count/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc
index 3a0e28cbd14..6325fdcd8c1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/constrained.cc
index c22cb596f61..f1804f4aae4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/count_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/count_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc
index c2eb07e29b9..0774032b0a0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/95578.cc b/libstdc++-v3/testsuite/25_algorithms/equal/95578.cc
index 6b01a699d05..f1816b665d7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc
index 7259000d59b..65d9707e7d1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr_neg.cc
index fd89ac0e166..db4cd2a43b1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-normal-mode "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/equal/constrained.cc
index c8bb00b1599..ac1feb3ca12 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc
index f5e46e58e49..5379dd35b7b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc
index a902e80d45b..d8f265d87b0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/constrained.cc
index 04108b83aef..31bc4340e6d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal_range/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/94017.cc b/libstdc++-v3/testsuite/25_algorithms/fill/94017.cc
index 23dc4570b09..dc36af488d6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill/94017.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/94017.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc
index 9c1ac5cf296..59bdd113a41 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/fill/constrained.cc
index fe868396895..296274f5ed7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/94017.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/94017.cc
index 1c0d7e51290..cf69331adb1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill_n/94017.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/94017.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc
index 0fdf22e0ade..9c024740ce3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/constrained.cc
index 75334901ced..7d21f48bb23 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fill_n/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc
index 9005f9fdf38..85f49f4827a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/find/constrained.cc
index 0f0b7354ff0..378e631537a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc
index 5315cb7fad9..663539ba9fc 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/constrained.cc
index e6369dd3865..51f3250e322 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_end/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_end/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc
index b60594d2a76..0c3c155093b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constrained.cc
index b1684a83efc..0320df85f91 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc
index a0f84029630..39592bfccd4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/constrained.cc
index d8240e81db0..210fc881f19 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc
index 3c0d4453d6d..667b1419d3f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constrained.cc
index 1655b009bbb..312a8399e81 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc
index 06ccf126fd8..7bc64ebc0cf 100644
--- a/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc
index 2258ebb9e75..1150f14ef55 100644
--- a/libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc
index 716ba4f8c47..0e7bd722ab6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/generate/constrained.cc
index ee159df4837..90cac5ad6ec 100644
--- a/libstdc++-v3/testsuite/25_algorithms/generate/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/generate/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc
index 6a29eb27ab6..ff3f7ac1180 100644
--- a/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/constrained.cc
index be2c7173189..c2445e9d1ac 100644
--- a/libstdc++-v3/testsuite/25_algorithms/generate_n/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/heap/constrained.cc
index 01507f27abf..20dc63d08df 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/includes/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/includes/constrained.cc
index 8bf156c738b..3463db9129b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/includes/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/includes/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/constrained.cc
index 5e72acceb29..a17f2ee8ee3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc
index 7448a9eebf2..30a2e1259a1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc
index 3134f606227..a58707b692f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc
index 8a6d0a2d689..08557d88965 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constrained.cc
index cb2d4426266..a35e3f45ead 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc
index 9226f50f2d0..758696662f0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constrained.cc
index e503247d44a..ffdb2d4647b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <iterator>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc
index a6282acbb92..637489ff8aa 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc
index 7309c3f4304..ee978e9a34d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc
index f54953d066c..05b096a32f4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constrained.cc
index e3b64fbe441..b693f723fbc 100644
--- a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc
index 1919554f930..c58191cd86d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/93972.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/93972.cc
index cc4ea7bfb67..418f084111e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/93972.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/93972.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/95578.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/95578.cc
index 24f52bfd36d..568346b292d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc
index a6f43221c76..06eccf54c81 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
index e8eafa9ae45..609d604debf 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/1.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/1.cc
index 633a5bdab5a..bd761b00d42 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc
index 7781ffdbe78..019179fce41 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc
index 6f3f61d07c3..450d09554b4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constrained.cc
index 97954673ddc..6b3992f0228 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc
index 74f947ece7c..6b41a8c3ed9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc
index 4b125b5b4f3..0d8413a481f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc
index 1edf35ccc0b..a052b710f36 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc
index 5399782c7d5..07c57581b60 100644
--- a/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/max/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/max/constrained.cc
index b204d8bf9b0..13e450fb6b1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/max/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/max/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/max_element/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/max_element/constrained.cc
index 0b8af2ba5cb..fcb8b37e64a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/max_element/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/max_element/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc
index fa0c7e374cb..7e5cc5036a7 100644
--- a/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/merge/constrained.cc
index cffca3c37b2..41923fc7622 100644
--- a/libstdc++-v3/testsuite/25_algorithms/merge/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/merge/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/min/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/min/constrained.cc
index ce2163e3380..2f07532a7b2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/min/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/min/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/min_element/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/min_element/constrained.cc
index 2709571cbda..8c535390187 100644
--- a/libstdc++-v3/testsuite/25_algorithms/min_element/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/min_element/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc
index 4fce546adf5..262cde7658b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <string>
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax_element/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/minmax_element/constrained.cc
index 1e5f7c92fed..e6a57c129ed 100644
--- a/libstdc++-v3/testsuite/25_algorithms/minmax_element/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax_element/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc
index 537e8ac5d15..5389d4f3400 100644
--- a/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/mismatch/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/mismatch/constrained.cc
index ddb0170e24f..d1237e145b5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/mismatch/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/mismatch/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/93872.cc b/libstdc++-v3/testsuite/25_algorithms/move/93872.cc
index 2b77a4f4e4b..ce221472a1b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/93872.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/93872.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <iterator>
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/95578.cc b/libstdc++-v3/testsuite/25_algorithms/move/95578.cc
index aec6520f78e..a65e2baf82f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc
index eb1f3b17e72..f678e104bd6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/move/constrained.cc
index 29a1abaaa02..abedfe76540 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/93872.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/93872.cc
index 10b58551761..29a54d404dc 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move_backward/93872.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/93872.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <iterator>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/95578.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/95578.cc
index 59403934599..eb97b74c082 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move_backward/95578.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/95578.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/constrained.cc
index bf9be9c730d..ebca065f50f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/move_backward/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc
index 2e496528009..9993277c7d3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constrained.cc
index 1fb911a8cb5..20c46fd979c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc
index e0bdd4043b7..e1555797b58 100644
--- a/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/none_of/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/none_of/constrained.cc
index aa955709053..84fafdc1d60 100644
--- a/libstdc++-v3/testsuite/25_algorithms/none_of/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/none_of/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc
index b9e1b2277c8..4962f455bba 100644
--- a/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/constrained.cc
index 79ddf8089d2..eee682cc7d4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/nth_element/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc
index 9eddfd934e4..00002b4a507 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constrained.cc
index ee40b9e3d79..c19574c5ac5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc
index 6782130e387..f070524616e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constrained.cc
index d521c0a0804..3ae74e7510d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc
index 88792603baf..190cc24c0e9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/partition/constrained.cc
index cd393c041e8..7049efdcb97 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc
index ab57e4fe097..dcdee0684db 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constrained.cc
index d0189cb7029..be3ace75c56 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc
index c41f559268d..20aa221d53e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_point/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/partition_point/constrained.cc
index 3b50730c827..de465231ba0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition_point/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition_point/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc
index c5697291ef3..f7bc0522791 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc
index ac75fecb519..8e2b254cda2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constrained.cc
index cab8ba24d27..e31e594bf0f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc
index e1aa47b0714..97947968697 100644
--- a/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc
index dfb1ea930fe..22dba856a47 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/remove/constrained.cc
index 144bd8d808a..81f3954ac7f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc
index b69148114f2..685e39cfc7c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constrained.cc
index 92841e40673..60daaf6778d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc
index 2f55cf6b032..2fab7f38f2f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constrained.cc
index ae07592231d..d3898630663 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc
index 3c55c173a5e..4888e48898f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/constrained.cc
index 9d11c69d25d..934357b15f6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/remove_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/replace/constrained.cc
index df0e3f493b9..8e6de45f8e6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc
index 7c0fbed51b8..8c0aed47b20 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constrained.cc
index 76794db3305..c016c2b83d2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc
index f0e4729131e..86cde832cf5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constrained.cc
index d767776194d..463e7c5161c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc
index 1036f8f23b1..e729589c6d0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/constrained.cc
index cfc31f1c32d..89d78ac3a38 100644
--- a/libstdc++-v3/testsuite/25_algorithms/replace_if/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc
index 15140014a09..ea559c02e60 100644
--- a/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/constrained.cc
index aea85589f35..6d4603c603c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/reverse/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc
index 3700be2b214..7d7b47f5987 100644
--- a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constrained.cc
index d1bd5350383..68e693667f8 100644
--- a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc
index b58f7f17b32..e65cae7c3d3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc
@@ -14,8 +14,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/constrained.cc
index d0b6409da0d..0167f1341db 100644
--- a/libstdc++-v3/testsuite/25_algorithms/rotate/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc
index c85aa707538..467f7c343ad 100644
--- a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constrained.cc
index 2d709bbac28..ab3b5e6567d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc
index 4f176c6b991..5b089d6dde9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc
index 0ada072e325..8a0edc6390c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/search/constrained.cc
index f1f50005c8d..0848a0af315 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/97828.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/97828.cc
index 662f5a23c8d..b6f9fda6cb0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/97828.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/97828.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // PR libstdc++/97828
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc
index 1941ea7f197..7285379381f 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/constrained.cc
index a5df93bdab2..503bcd23c35 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc
index 04f170613a4..94c4aa330c2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/constrained.cc
index f668196a5f0..ca57ab68527 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_difference/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc
index 4a6721e64d5..8135f9ff6d5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constrained.cc
index e56b97814d7..7f554b2426d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc
index 5877020507d..49f9cffd8b1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constrained.cc
index 033de26af5a..83c643fa645 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc
index 52b3103013e..d5203467d5c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/constrained.cc
index 3b7882f2a59..3b523376de5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/set_union/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/set_union/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/shift_left/1.cc b/libstdc++-v3/testsuite/25_algorithms/shift_left/1.cc
index fd65b414c04..5bb8e920ef0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/shift_left/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/shift_left/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/shift_right/1.cc b/libstdc++-v3/testsuite/25_algorithms/shift_right/1.cc
index 1a03e2928c5..70b07a55008 100644
--- a/libstdc++-v3/testsuite/25_algorithms/shift_right/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/shift_right/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
index e2f329cb309..b6c2d7f3a4d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc
index ddbd376a76a..40fcf533e02 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/sort/constrained.cc
index 3b8bbf8a137..f6379d6a97c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sort/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc
index a8a8ce1e438..d3b4b9a81b4 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/constrained.cc
index f3f4e233b4a..4dfc21d80ae 100644
--- a/libstdc++-v3/testsuite/25_algorithms/stable_partition/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // std::stable_partition is not freestanding.
 // { dg-require-effective-target hosted }
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/constrained.cc
index 68b9d5b8b75..f24e810963b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/stable_sort/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-require-cstdint "" }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc
index 9259c06fa5e..aad91d1a876 100644
--- a/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc
index b2f25e1e6ee..78e1fe529df 100644
--- a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constrained.cc
index c79e783f33f..aea3a66fad5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc
index bcd313543ea..47ba3c6c9da 100644
--- a/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/transform/constrained.cc
index 377fd435feb..73a584a7983 100644
--- a/libstdc++-v3/testsuite/25_algorithms/transform/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/transform/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <functional>
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc
index 31c12627b90..29545c2c407 100644
--- a/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/unique/constrained.cc
index 09e855e86c2..d015e3da428 100644
--- a/libstdc++-v3/testsuite/25_algorithms/unique/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/unique/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <list>
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc
index 324dfee6b27..71d5860e3e6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constrained.cc
index 388fc27b23a..e2dd6c16b9b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc
index 88d45f6dee1..09fa9444e6d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constrained.cc
index 7c0acc81995..7a8710a776d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constrained.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc
index 577fbfebb8a..6c39732b652 100644
--- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc
index 0774c17d0cf..133265a8912 100644
--- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc
index 31bb9c382cd..9b6ce3fa1f0 100644
--- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-debug-mode { } }
 
 #include <algorithm>
-- 
2.41.0


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

* [PATCH 08/13] libstdc++: Remove dg-options "-std=gnu++20" from std::format tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (6 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 07/13] libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 09/13] libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests Jonathan Wakely
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

	* testsuite/std/format/arguments/args.cc: Remove dg-options.
	* testsuite/std/format/arguments/lwg3810.cc: Likewise. Likewise.
	* testsuite/std/format/error.cc: Likewise.
	* testsuite/std/format/format_string.cc: Likewise.
	* testsuite/std/format/formatter/concept.cc: Likewise.
	* testsuite/std/format/formatter/ext_float.cc: Likewise.
	* testsuite/std/format/formatter/requirements.cc: Likewise.
	* testsuite/std/format/functions/107871.cc: Likewise.
	* testsuite/std/format/functions/format.cc: Likewise.
	* testsuite/std/format/functions/format_to.cc: Likewise.
	* testsuite/std/format/functions/format_to_n.cc: Likewise.
	* testsuite/std/format/functions/size.cc: Likewise.
	* testsuite/std/format/functions/vformat_to.cc: Likewise.
	* testsuite/std/format/parse_ctx.cc: Likewise.
	* testsuite/std/format/string.cc: Likewise.
	* testsuite/std/format/string_neg.cc: Likewise.
	* testsuite/std/format/functions/format_c++23.cc: Removed.
---
 libstdc++-v3/testsuite/std/format/arguments/args.cc         | 1 -
 libstdc++-v3/testsuite/std/format/arguments/lwg3810.cc      | 1 -
 libstdc++-v3/testsuite/std/format/error.cc                  | 1 -
 libstdc++-v3/testsuite/std/format/format_string.cc          | 1 -
 libstdc++-v3/testsuite/std/format/formatter/concept.cc      | 1 -
 libstdc++-v3/testsuite/std/format/formatter/ext_float.cc    | 1 -
 libstdc++-v3/testsuite/std/format/formatter/requirements.cc | 1 -
 libstdc++-v3/testsuite/std/format/functions/107871.cc       | 1 -
 libstdc++-v3/testsuite/std/format/functions/format.cc       | 1 -
 libstdc++-v3/testsuite/std/format/functions/format_c++23.cc | 5 -----
 libstdc++-v3/testsuite/std/format/functions/format_to.cc    | 1 -
 libstdc++-v3/testsuite/std/format/functions/format_to_n.cc  | 1 -
 libstdc++-v3/testsuite/std/format/functions/size.cc         | 1 -
 libstdc++-v3/testsuite/std/format/functions/vformat_to.cc   | 1 -
 libstdc++-v3/testsuite/std/format/parse_ctx.cc              | 1 -
 libstdc++-v3/testsuite/std/format/string.cc                 | 1 -
 libstdc++-v3/testsuite/std/format/string_neg.cc             | 1 -
 17 files changed, 21 deletions(-)
 delete mode 100644 libstdc++-v3/testsuite/std/format/functions/format_c++23.cc

diff --git a/libstdc++-v3/testsuite/std/format/arguments/args.cc b/libstdc++-v3/testsuite/std/format/arguments/args.cc
index ae2eab6d560..a45f3fb24df 100644
--- a/libstdc++-v3/testsuite/std/format/arguments/args.cc
+++ b/libstdc++-v3/testsuite/std/format/arguments/args.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/arguments/lwg3810.cc b/libstdc++-v3/testsuite/std/format/arguments/lwg3810.cc
index 9ccb654de1b..f89f40203cb 100644
--- a/libstdc++-v3/testsuite/std/format/arguments/lwg3810.cc
+++ b/libstdc++-v3/testsuite/std/format/arguments/lwg3810.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 // LWG 3810. CTAD for std::basic_format_args
diff --git a/libstdc++-v3/testsuite/std/format/error.cc b/libstdc++-v3/testsuite/std/format/error.cc
index a6918f5ab2e..878f60e0ec9 100644
--- a/libstdc++-v3/testsuite/std/format/error.cc
+++ b/libstdc++-v3/testsuite/std/format/error.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/format_string.cc b/libstdc++-v3/testsuite/std/format/format_string.cc
index 1dd6ca8f125..71c3d5d68f6 100644
--- a/libstdc++-v3/testsuite/std/format/format_string.cc
+++ b/libstdc++-v3/testsuite/std/format/format_string.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/formatter/concept.cc b/libstdc++-v3/testsuite/std/format/formatter/concept.cc
index fe56dc44a68..e28a8c20a87 100644
--- a/libstdc++-v3/testsuite/std/format/formatter/concept.cc
+++ b/libstdc++-v3/testsuite/std/format/formatter/concept.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/formatter/ext_float.cc b/libstdc++-v3/testsuite/std/format/formatter/ext_float.cc
index 89810295b64..82e696fa797 100644
--- a/libstdc++-v3/testsuite/std/format/formatter/ext_float.cc
+++ b/libstdc++-v3/testsuite/std/format/formatter/ext_float.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/formatter/requirements.cc b/libstdc++-v3/testsuite/std/format/formatter/requirements.cc
index 7d95f7fafe9..bde67e586ef 100644
--- a/libstdc++-v3/testsuite/std/format/formatter/requirements.cc
+++ b/libstdc++-v3/testsuite/std/format/formatter/requirements.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/functions/107871.cc b/libstdc++-v3/testsuite/std/format/functions/107871.cc
index 1fb558e7ac6..f9125b930af 100644
--- a/libstdc++-v3/testsuite/std/format/functions/107871.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/107871.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/functions/format.cc b/libstdc++-v3/testsuite/std/format/functions/format.cc
index 5141cbd11bf..dacc276e03c 100644
--- a/libstdc++-v3/testsuite/std/format/functions/format.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/format.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-add-options no_pch }
 
diff --git a/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc b/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc
deleted file mode 100644
index 3caa70fcdf2..00000000000
--- a/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc
+++ /dev/null
@@ -1,5 +0,0 @@
-// { dg-do run { target c++23 } }
-// { dg-add-options no_pch }
-// This test does not have -std=gnu++20 in dg-options so that format.cc
-// can be tested for e.g. -std=c++26
-#include "format.cc"
diff --git a/libstdc++-v3/testsuite/std/format/functions/format_to.cc b/libstdc++-v3/testsuite/std/format/functions/format_to.cc
index c5c3c503625..94e6262bc66 100644
--- a/libstdc++-v3/testsuite/std/format/functions/format_to.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/format_to.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/functions/format_to_n.cc b/libstdc++-v3/testsuite/std/format/functions/format_to_n.cc
index f7df3ed36dc..d6982222528 100644
--- a/libstdc++-v3/testsuite/std/format/functions/format_to_n.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/format_to_n.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/functions/size.cc b/libstdc++-v3/testsuite/std/format/functions/size.cc
index 4509a7ccd73..1ece4108d85 100644
--- a/libstdc++-v3/testsuite/std/format/functions/size.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/size.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/functions/vformat_to.cc b/libstdc++-v3/testsuite/std/format/functions/vformat_to.cc
index 6fa33b9fbac..fe0367f7496 100644
--- a/libstdc++-v3/testsuite/std/format/functions/vformat_to.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/vformat_to.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/parse_ctx.cc b/libstdc++-v3/testsuite/std/format/parse_ctx.cc
index 260caf123d0..497427b54e5 100644
--- a/libstdc++-v3/testsuite/std/format/parse_ctx.cc
+++ b/libstdc++-v3/testsuite/std/format/parse_ctx.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/string.cc b/libstdc++-v3/testsuite/std/format/string.cc
index a472f8d588c..5d338644c62 100644
--- a/libstdc++-v3/testsuite/std/format/string.cc
+++ b/libstdc++-v3/testsuite/std/format/string.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <format>
diff --git a/libstdc++-v3/testsuite/std/format/string_neg.cc b/libstdc++-v3/testsuite/std/format/string_neg.cc
index 8ec7096ffd3..7a60ef8cf0e 100644
--- a/libstdc++-v3/testsuite/std/format/string_neg.cc
+++ b/libstdc++-v3/testsuite/std/format/string_neg.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <format>
-- 
2.41.0


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

* [PATCH 09/13] libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (7 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 08/13] libstdc++: Remove dg-options "-std=gnu++20" from std::format tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 10/13] libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests Jonathan Wakely
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/duration/arithmetic/overflow_c++20.cc:
	Remove dg-options.
	* testsuite/20_util/duration/io.cc: Likewise.
	* testsuite/std/time/clock/file/io.cc: Likewise.
	* testsuite/std/time/clock/file/members.cc: Likewise.
	* testsuite/std/time/clock/file/overview.cc: Likewise.
	* testsuite/std/time/clock/gps/1.cc: Likewise.
	* testsuite/std/time/clock/gps/io.cc: Likewise.
	* testsuite/std/time/clock/local/io.cc: Likewise.
	* testsuite/std/time/clock/system/io.cc: Likewise.
	* testsuite/std/time/clock/tai/1.cc: Likewise.
	* testsuite/std/time/clock/tai/io.cc: Likewise.
	* testsuite/std/time/clock/utc/1.cc: Likewise.
	* testsuite/std/time/clock/utc/io.cc: Likewise.
	* testsuite/std/time/clock/utc/leap_second_info.cc: Likewise.
	* testsuite/std/time/day/1.cc: Likewise.
	* testsuite/std/time/day/io.cc: Likewise.
	* testsuite/std/time/exceptions.cc: Likewise.
	* testsuite/std/time/format.cc: Likewise.
	* testsuite/std/time/hh_mm_ss/1.cc: Likewise.
	* testsuite/std/time/hh_mm_ss/109772.cc: Likewise.
	* testsuite/std/time/hh_mm_ss/io.cc: Likewise.
	* testsuite/std/time/is_am/1.cc: Likewise.
	* testsuite/std/time/is_pm/1.cc: Likewise.
	* testsuite/std/time/make12/1.cc: Likewise.
	* testsuite/std/time/make24/1.cc: Likewise.
	* testsuite/std/time/month/1.cc: Likewise.
	* testsuite/std/time/month/io.cc: Likewise.
	* testsuite/std/time/month_day/1.cc: Likewise.
	* testsuite/std/time/month_day/io.cc: Likewise.
	* testsuite/std/time/month_day_last/1.cc: Likewise.
	* testsuite/std/time/month_day_last/io.cc: Likewise.
	* testsuite/std/time/month_weekday/1.cc: Likewise.
	* testsuite/std/time/month_weekday/io.cc: Likewise.
	* testsuite/std/time/month_weekday_last/1.cc: Likewise.
	* testsuite/std/time/month_weekday_last/io.cc: Likewise.
	* testsuite/std/time/parse.cc: Likewise.
	* testsuite/std/time/syn_c++20.cc: Likewise.
	* testsuite/std/time/time_zone/get_info_local.cc: Likewise.
	* testsuite/std/time/time_zone/get_info_sys.cc: Likewise.
	* testsuite/std/time/time_zone/requirements.cc: Likewise.
	* testsuite/std/time/traits/is_clock.cc: Likewise.
	* testsuite/std/time/tzdb/1.cc: Likewise.
	* testsuite/std/time/tzdb/leap_seconds.cc: Likewise.
	* testsuite/std/time/tzdb_list/1.cc: Likewise.
	* testsuite/std/time/tzdb_list/requirements.cc: Likewise.
	* testsuite/std/time/weekday/1.cc: Likewise.
	* testsuite/std/time/weekday/io.cc: Likewise.
	* testsuite/std/time/weekday_indexed/io.cc: Likewise.
	* testsuite/std/time/weekday_last/1.cc: Likewise.
	* testsuite/std/time/weekday_last/io.cc: Likewise.
	* testsuite/std/time/year/1.cc: Likewise.
	* testsuite/std/time/year/2.cc: Likewise.
	* testsuite/std/time/year/io.cc: Likewise.
	* testsuite/std/time/weekday_indexed/1.cc: Likewise.
	* testsuite/std/time/year_month/1.cc: Likewise.
	* testsuite/std/time/year_month/2.cc: Likewise.
	* testsuite/std/time/year_month/io.cc: Likewise.
	* testsuite/std/time/year_month_day/1.cc: Likewise.
	* testsuite/std/time/year_month_day/2.cc: Likewise.
	* testsuite/std/time/year_month_day/3.cc: Likewise.
	* testsuite/std/time/year_month_day/4.cc: Likewise.
	* testsuite/std/time/year_month_day/io.cc: Likewise.
	* testsuite/std/time/year_month_day_last/1.cc: Likewise.
	* testsuite/std/time/year_month_day_last/2.cc: Likewise.
	* testsuite/std/time/year_month_day_last/io.cc: Likewise.
	* testsuite/std/time/year_month_weekday/1.cc: Likewise.
	* testsuite/std/time/year_month_weekday/2.cc: Likewise.
	* testsuite/std/time/year_month_weekday/3.cc: Likewise.
	* testsuite/std/time/year_month_weekday/io.cc: Likewise.
	* testsuite/std/time/year_month_weekday_last/1.cc: Likewise.
	* testsuite/std/time/year_month_weekday_last/2.cc: Likewise.
	* testsuite/std/time/year_month_weekday_last/io.cc: Likewise.
	* testsuite/std/time/zoned_time/1.cc: Likewise.
	* testsuite/std/time/zoned_time/custom.cc: Likewise.
	* testsuite/std/time/zoned_time/deduction.cc: Likewise.
	* testsuite/std/time/zoned_time/io.cc: Likewise.
	* testsuite/std/time/zoned_time/req_neg.cc: Likewise.
	* testsuite/std/time/zoned_time/requirements.cc: Likewise.
	* testsuite/std/time/zoned_traits.cc: Likewise.
---
 .../testsuite/20_util/duration/arithmetic/overflow_c++20.cc    | 1 -
 libstdc++-v3/testsuite/20_util/duration/io.cc                  | 1 -
 libstdc++-v3/testsuite/std/time/clock/file/io.cc               | 1 -
 libstdc++-v3/testsuite/std/time/clock/file/members.cc          | 3 +--
 libstdc++-v3/testsuite/std/time/clock/file/overview.cc         | 3 +--
 libstdc++-v3/testsuite/std/time/clock/gps/1.cc                 | 1 -
 libstdc++-v3/testsuite/std/time/clock/gps/io.cc                | 1 -
 libstdc++-v3/testsuite/std/time/clock/local/io.cc              | 1 -
 libstdc++-v3/testsuite/std/time/clock/system/io.cc             | 1 -
 libstdc++-v3/testsuite/std/time/clock/tai/1.cc                 | 1 -
 libstdc++-v3/testsuite/std/time/clock/tai/io.cc                | 1 -
 libstdc++-v3/testsuite/std/time/clock/utc/1.cc                 | 1 -
 libstdc++-v3/testsuite/std/time/clock/utc/io.cc                | 1 -
 libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info.cc  | 1 -
 libstdc++-v3/testsuite/std/time/day/1.cc                       | 3 +--
 libstdc++-v3/testsuite/std/time/day/io.cc                      | 1 -
 libstdc++-v3/testsuite/std/time/exceptions.cc                  | 1 -
 libstdc++-v3/testsuite/std/time/format.cc                      | 1 -
 libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc                  | 3 +--
 libstdc++-v3/testsuite/std/time/hh_mm_ss/109772.cc             | 1 -
 libstdc++-v3/testsuite/std/time/hh_mm_ss/io.cc                 | 1 -
 libstdc++-v3/testsuite/std/time/is_am/1.cc                     | 3 +--
 libstdc++-v3/testsuite/std/time/is_pm/1.cc                     | 3 +--
 libstdc++-v3/testsuite/std/time/make12/1.cc                    | 3 +--
 libstdc++-v3/testsuite/std/time/make24/1.cc                    | 3 +--
 libstdc++-v3/testsuite/std/time/month/1.cc                     | 3 +--
 libstdc++-v3/testsuite/std/time/month/io.cc                    | 1 -
 libstdc++-v3/testsuite/std/time/month_day/1.cc                 | 3 +--
 libstdc++-v3/testsuite/std/time/month_day/io.cc                | 1 -
 libstdc++-v3/testsuite/std/time/month_day_last/1.cc            | 3 +--
 libstdc++-v3/testsuite/std/time/month_day_last/io.cc           | 1 -
 libstdc++-v3/testsuite/std/time/month_weekday/1.cc             | 3 +--
 libstdc++-v3/testsuite/std/time/month_weekday/io.cc            | 1 -
 libstdc++-v3/testsuite/std/time/month_weekday_last/1.cc        | 3 +--
 libstdc++-v3/testsuite/std/time/month_weekday_last/io.cc       | 1 -
 libstdc++-v3/testsuite/std/time/parse.cc                       | 1 -
 libstdc++-v3/testsuite/std/time/syn_c++20.cc                   | 3 +--
 libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc    | 1 -
 libstdc++-v3/testsuite/std/time/time_zone/get_info_sys.cc      | 1 -
 libstdc++-v3/testsuite/std/time/time_zone/requirements.cc      | 1 -
 libstdc++-v3/testsuite/std/time/traits/is_clock.cc             | 3 +--
 libstdc++-v3/testsuite/std/time/tzdb/1.cc                      | 1 -
 libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc           | 1 -
 libstdc++-v3/testsuite/std/time/tzdb_list/1.cc                 | 1 -
 libstdc++-v3/testsuite/std/time/tzdb_list/requirements.cc      | 1 -
 libstdc++-v3/testsuite/std/time/weekday/1.cc                   | 3 +--
 libstdc++-v3/testsuite/std/time/weekday/io.cc                  | 1 -
 libstdc++-v3/testsuite/std/time/weekday_indexed/1.cc           | 3 +--
 libstdc++-v3/testsuite/std/time/weekday_indexed/io.cc          | 1 -
 libstdc++-v3/testsuite/std/time/weekday_last/1.cc              | 3 +--
 libstdc++-v3/testsuite/std/time/weekday_last/io.cc             | 1 -
 libstdc++-v3/testsuite/std/time/year/1.cc                      | 3 +--
 libstdc++-v3/testsuite/std/time/year/2.cc                      | 3 +--
 libstdc++-v3/testsuite/std/time/year/io.cc                     | 1 -
 libstdc++-v3/testsuite/std/time/year_month/1.cc                | 3 +--
 libstdc++-v3/testsuite/std/time/year_month/2.cc                | 3 +--
 libstdc++-v3/testsuite/std/time/year_month/io.cc               | 1 -
 libstdc++-v3/testsuite/std/time/year_month_day/1.cc            | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day/2.cc            | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day/3.cc            | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day/4.cc            | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day/io.cc           | 1 -
 libstdc++-v3/testsuite/std/time/year_month_day_last/1.cc       | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day_last/2.cc       | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_day_last/io.cc      | 1 -
 libstdc++-v3/testsuite/std/time/year_month_weekday/1.cc        | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_weekday/2.cc        | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_weekday/3.cc        | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_weekday/io.cc       | 1 -
 libstdc++-v3/testsuite/std/time/year_month_weekday_last/1.cc   | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_weekday_last/2.cc   | 3 +--
 libstdc++-v3/testsuite/std/time/year_month_weekday_last/io.cc  | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/1.cc                | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/custom.cc           | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/deduction.cc        | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/io.cc               | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/req_neg.cc          | 1 -
 libstdc++-v3/testsuite/std/time/zoned_time/requirements.cc     | 1 -
 libstdc++-v3/testsuite/std/time/zoned_traits.cc                | 1 -
 79 files changed, 33 insertions(+), 112 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/overflow_c++20.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/overflow_c++20.cc
index 42fa7ea55fb..ba1f775cb3a 100644
--- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/overflow_c++20.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/overflow_c++20.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/20_util/duration/io.cc b/libstdc++-v3/testsuite/20_util/duration/io.cc
index 5cbc050e210..a652a34e52f 100644
--- a/libstdc++-v3/testsuite/20_util/duration/io.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/file/io.cc b/libstdc++-v3/testsuite/std/time/clock/file/io.cc
index a6c7c71cfd3..c3ac6cf4d6d 100644
--- a/libstdc++-v3/testsuite/std/time/clock/file/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/file/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/file/members.cc b/libstdc++-v3/testsuite/std/time/clock/file/members.cc
index b34df49c650..d9949b69ad9 100644
--- a/libstdc++-v3/testsuite/std/time/clock/file/members.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/file/members.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <chrono>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/time/clock/file/overview.cc b/libstdc++-v3/testsuite/std/time/clock/file/overview.cc
index e27dfafcf07..33d31f61853 100644
--- a/libstdc++-v3/testsuite/std/time/clock/file/overview.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/file/overview.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <chrono>
 
diff --git a/libstdc++-v3/testsuite/std/time/clock/gps/1.cc b/libstdc++-v3/testsuite/std/time/clock/gps/1.cc
index f6bfe49207d..8be517b316b 100644
--- a/libstdc++-v3/testsuite/std/time/clock/gps/1.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/gps/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/gps/io.cc b/libstdc++-v3/testsuite/std/time/clock/gps/io.cc
index c4fe9bee0f1..eac1c13c63a 100644
--- a/libstdc++-v3/testsuite/std/time/clock/gps/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/gps/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/local/io.cc b/libstdc++-v3/testsuite/std/time/clock/local/io.cc
index a7c018d95d4..b16ddbab90b 100644
--- a/libstdc++-v3/testsuite/std/time/clock/local/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/local/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/system/io.cc b/libstdc++-v3/testsuite/std/time/clock/system/io.cc
index 8bfaad3278e..d0962353c29 100644
--- a/libstdc++-v3/testsuite/std/time/clock/system/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/system/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/tai/1.cc b/libstdc++-v3/testsuite/std/time/clock/tai/1.cc
index 08fc972c550..63cc9927859 100644
--- a/libstdc++-v3/testsuite/std/time/clock/tai/1.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/tai/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/tai/io.cc b/libstdc++-v3/testsuite/std/time/clock/tai/io.cc
index 530af75442b..0c5b5872d0c 100644
--- a/libstdc++-v3/testsuite/std/time/clock/tai/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/tai/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/utc/1.cc b/libstdc++-v3/testsuite/std/time/clock/utc/1.cc
index 18578fb1ab1..4852658001e 100644
--- a/libstdc++-v3/testsuite/std/time/clock/utc/1.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/utc/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/utc/io.cc b/libstdc++-v3/testsuite/std/time/clock/utc/io.cc
index c49f6f7e22c..f39eb3f3e8e 100644
--- a/libstdc++-v3/testsuite/std/time/clock/utc/io.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/utc/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info.cc b/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info.cc
index 0140c756dab..2fabda49423 100644
--- a/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info.cc
+++ b/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-additional-options "-DHAVE_TZDB" { target tzdb } }
 
diff --git a/libstdc++-v3/testsuite/std/time/day/1.cc b/libstdc++-v3/testsuite/std/time/day/1.cc
index 8f1632f53d7..60bdc6cc4fd 100644
--- a/libstdc++-v3/testsuite/std/time/day/1.cc
+++ b/libstdc++-v3/testsuite/std/time/day/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/day/io.cc b/libstdc++-v3/testsuite/std/time/day/io.cc
index d8691b72066..cf5cd3439c4 100644
--- a/libstdc++-v3/testsuite/std/time/day/io.cc
+++ b/libstdc++-v3/testsuite/std/time/day/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/exceptions.cc b/libstdc++-v3/testsuite/std/time/exceptions.cc
index 650b1fe7a37..06b8a53c353 100644
--- a/libstdc++-v3/testsuite/std/time/exceptions.cc
+++ b/libstdc++-v3/testsuite/std/time/exceptions.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 
diff --git a/libstdc++-v3/testsuite/std/time/format.cc b/libstdc++-v3/testsuite/std/time/format.cc
index 0dc45d58dce..97035e2cdd4 100644
--- a/libstdc++-v3/testsuite/std/time/format.cc
+++ b/libstdc++-v3/testsuite/std/time/format.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc b/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc
index 85f991c5e03..b581cb02203 100644
--- a/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc
+++ b/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/hh_mm_ss/109772.cc b/libstdc++-v3/testsuite/std/time/hh_mm_ss/109772.cc
index 36137f283d2..4aa3e31b8cd 100644
--- a/libstdc++-v3/testsuite/std/time/hh_mm_ss/109772.cc
+++ b/libstdc++-v3/testsuite/std/time/hh_mm_ss/109772.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 // PR libstdc++/109772 Memory layout optimization of chrono::hh_mm_ss is wrong
diff --git a/libstdc++-v3/testsuite/std/time/hh_mm_ss/io.cc b/libstdc++-v3/testsuite/std/time/hh_mm_ss/io.cc
index ddb1ad77d1e..e431f0cf918 100644
--- a/libstdc++-v3/testsuite/std/time/hh_mm_ss/io.cc
+++ b/libstdc++-v3/testsuite/std/time/hh_mm_ss/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/is_am/1.cc b/libstdc++-v3/testsuite/std/time/is_am/1.cc
index aef660c96f5..de3f3d96f6f 100644
--- a/libstdc++-v3/testsuite/std/time/is_am/1.cc
+++ b/libstdc++-v3/testsuite/std/time/is_am/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/is_pm/1.cc b/libstdc++-v3/testsuite/std/time/is_pm/1.cc
index d7ee974031e..6c059c79740 100644
--- a/libstdc++-v3/testsuite/std/time/is_pm/1.cc
+++ b/libstdc++-v3/testsuite/std/time/is_pm/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/make12/1.cc b/libstdc++-v3/testsuite/std/time/make12/1.cc
index b516df292fd..1ccf19a353c 100644
--- a/libstdc++-v3/testsuite/std/time/make12/1.cc
+++ b/libstdc++-v3/testsuite/std/time/make12/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/make24/1.cc b/libstdc++-v3/testsuite/std/time/make24/1.cc
index 99f9d807247..6ede9222f35 100644
--- a/libstdc++-v3/testsuite/std/time/make24/1.cc
+++ b/libstdc++-v3/testsuite/std/time/make24/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month/1.cc b/libstdc++-v3/testsuite/std/time/month/1.cc
index 89cb9aba152..773f772bf07 100644
--- a/libstdc++-v3/testsuite/std/time/month/1.cc
+++ b/libstdc++-v3/testsuite/std/time/month/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month/io.cc b/libstdc++-v3/testsuite/std/time/month/io.cc
index 9cf5b053f2b..fb1c6425f4c 100644
--- a/libstdc++-v3/testsuite/std/time/month/io.cc
+++ b/libstdc++-v3/testsuite/std/time/month/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/month_day/1.cc b/libstdc++-v3/testsuite/std/time/month_day/1.cc
index 8c7553c1751..2c265676952 100644
--- a/libstdc++-v3/testsuite/std/time/month_day/1.cc
+++ b/libstdc++-v3/testsuite/std/time/month_day/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month_day/io.cc b/libstdc++-v3/testsuite/std/time/month_day/io.cc
index a3f4599fb4e..4dafbb212f6 100644
--- a/libstdc++-v3/testsuite/std/time/month_day/io.cc
+++ b/libstdc++-v3/testsuite/std/time/month_day/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/month_day_last/1.cc b/libstdc++-v3/testsuite/std/time/month_day_last/1.cc
index 92326ce7194..4ebf643db7b 100644
--- a/libstdc++-v3/testsuite/std/time/month_day_last/1.cc
+++ b/libstdc++-v3/testsuite/std/time/month_day_last/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month_day_last/io.cc b/libstdc++-v3/testsuite/std/time/month_day_last/io.cc
index 6bd95d9d524..4f430d4e3e3 100644
--- a/libstdc++-v3/testsuite/std/time/month_day_last/io.cc
+++ b/libstdc++-v3/testsuite/std/time/month_day_last/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/month_weekday/1.cc b/libstdc++-v3/testsuite/std/time/month_weekday/1.cc
index b332c65f709..7bcdf510da0 100644
--- a/libstdc++-v3/testsuite/std/time/month_weekday/1.cc
+++ b/libstdc++-v3/testsuite/std/time/month_weekday/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month_weekday/io.cc b/libstdc++-v3/testsuite/std/time/month_weekday/io.cc
index a62f84a16aa..ee841eb1ef1 100644
--- a/libstdc++-v3/testsuite/std/time/month_weekday/io.cc
+++ b/libstdc++-v3/testsuite/std/time/month_weekday/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/month_weekday_last/1.cc b/libstdc++-v3/testsuite/std/time/month_weekday_last/1.cc
index ff86e1d3295..208c34be939 100644
--- a/libstdc++-v3/testsuite/std/time/month_weekday_last/1.cc
+++ b/libstdc++-v3/testsuite/std/time/month_weekday_last/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/month_weekday_last/io.cc b/libstdc++-v3/testsuite/std/time/month_weekday_last/io.cc
index f69cc187ce8..96a9ad9bd62 100644
--- a/libstdc++-v3/testsuite/std/time/month_weekday_last/io.cc
+++ b/libstdc++-v3/testsuite/std/time/month_weekday_last/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/parse.cc b/libstdc++-v3/testsuite/std/time/parse.cc
index 0ef56cf1cfa..8bb0fd0beba 100644
--- a/libstdc++-v3/testsuite/std/time/parse.cc
+++ b/libstdc++-v3/testsuite/std/time/parse.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <chrono>
diff --git a/libstdc++-v3/testsuite/std/time/syn_c++20.cc b/libstdc++-v3/testsuite/std/time/syn_c++20.cc
index 307d84e5435..9f0e5ee5a9d 100644
--- a/libstdc++-v3/testsuite/std/time/syn_c++20.cc
+++ b/libstdc++-v3/testsuite/std/time/syn_c++20.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <chrono>
 
diff --git a/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc b/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
index e5e342dcff9..d2972aca7df 100644
--- a/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
+++ b/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 
diff --git a/libstdc++-v3/testsuite/std/time/time_zone/get_info_sys.cc b/libstdc++-v3/testsuite/std/time/time_zone/get_info_sys.cc
index a669b68e440..769c7744017 100644
--- a/libstdc++-v3/testsuite/std/time/time_zone/get_info_sys.cc
+++ b/libstdc++-v3/testsuite/std/time/time_zone/get_info_sys.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 
diff --git a/libstdc++-v3/testsuite/std/time/time_zone/requirements.cc b/libstdc++-v3/testsuite/std/time/time_zone/requirements.cc
index 9bbe3193b2d..929fea2c0eb 100644
--- a/libstdc++-v3/testsuite/std/time/time_zone/requirements.cc
+++ b/libstdc++-v3/testsuite/std/time/time_zone/requirements.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/traits/is_clock.cc b/libstdc++-v3/testsuite/std/time/traits/is_clock.cc
index 94c1a0801c5..1d936a53629 100644
--- a/libstdc++-v3/testsuite/std/time/traits/is_clock.cc
+++ b/libstdc++-v3/testsuite/std/time/traits/is_clock.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <chrono>
 #include <slow_clock.h>
diff --git a/libstdc++-v3/testsuite/std/time/tzdb/1.cc b/libstdc++-v3/testsuite/std/time/tzdb/1.cc
index 877a55b8d31..cf9df952577 100644
--- a/libstdc++-v3/testsuite/std/time/tzdb/1.cc
+++ b/libstdc++-v3/testsuite/std/time/tzdb/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc b/libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc
index d27038225c8..f5401a24526 100644
--- a/libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc
+++ b/libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 // { dg-require-effective-target cxx11_abi }
diff --git a/libstdc++-v3/testsuite/std/time/tzdb_list/1.cc b/libstdc++-v3/testsuite/std/time/tzdb_list/1.cc
index e52f346d266..587aa950277 100644
--- a/libstdc++-v3/testsuite/std/time/tzdb_list/1.cc
+++ b/libstdc++-v3/testsuite/std/time/tzdb_list/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 // { dg-require-effective-target cxx11_abi }
diff --git a/libstdc++-v3/testsuite/std/time/tzdb_list/requirements.cc b/libstdc++-v3/testsuite/std/time/tzdb_list/requirements.cc
index a2fd8a4eb57..b26704f4146 100644
--- a/libstdc++-v3/testsuite/std/time/tzdb_list/requirements.cc
+++ b/libstdc++-v3/testsuite/std/time/tzdb_list/requirements.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/weekday/1.cc b/libstdc++-v3/testsuite/std/time/weekday/1.cc
index 1e018eaa3e0..00278c8b01c 100644
--- a/libstdc++-v3/testsuite/std/time/weekday/1.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/weekday/io.cc b/libstdc++-v3/testsuite/std/time/weekday/io.cc
index ba9dce00f6c..6f6a03774fa 100644
--- a/libstdc++-v3/testsuite/std/time/weekday/io.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/weekday_indexed/1.cc b/libstdc++-v3/testsuite/std/time/weekday_indexed/1.cc
index feeb19b2eca..4eed4bfa392 100644
--- a/libstdc++-v3/testsuite/std/time/weekday_indexed/1.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday_indexed/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/weekday_indexed/io.cc b/libstdc++-v3/testsuite/std/time/weekday_indexed/io.cc
index cdb91f4ba11..530138ea839 100644
--- a/libstdc++-v3/testsuite/std/time/weekday_indexed/io.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday_indexed/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/weekday_last/1.cc b/libstdc++-v3/testsuite/std/time/weekday_last/1.cc
index d7259266d5b..7cb0d296a19 100644
--- a/libstdc++-v3/testsuite/std/time/weekday_last/1.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday_last/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/weekday_last/io.cc b/libstdc++-v3/testsuite/std/time/weekday_last/io.cc
index b81830f8f68..de88ad20540 100644
--- a/libstdc++-v3/testsuite/std/time/weekday_last/io.cc
+++ b/libstdc++-v3/testsuite/std/time/weekday_last/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year/1.cc b/libstdc++-v3/testsuite/std/time/year/1.cc
index 7566b81c713..d8add1718cd 100644
--- a/libstdc++-v3/testsuite/std/time/year/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year/2.cc b/libstdc++-v3/testsuite/std/time/year/2.cc
index d7041352ad1..d76593a293d 100644
--- a/libstdc++-v3/testsuite/std/time/year/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year/io.cc b/libstdc++-v3/testsuite/std/time/year/io.cc
index 0c474647921..f26162d94cf 100644
--- a/libstdc++-v3/testsuite/std/time/year/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year_month/1.cc b/libstdc++-v3/testsuite/std/time/year_month/1.cc
index 71d92cc72bf..ceda56879cf 100644
--- a/libstdc++-v3/testsuite/std/time/year_month/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month/2.cc b/libstdc++-v3/testsuite/std/time/year_month/2.cc
index 2475dbbf3b5..73c9bbfb09b 100644
--- a/libstdc++-v3/testsuite/std/time/year_month/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month/io.cc b/libstdc++-v3/testsuite/std/time/year_month/io.cc
index 8dac2486188..1b58a9e2468 100644
--- a/libstdc++-v3/testsuite/std/time/year_month/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/1.cc b/libstdc++-v3/testsuite/std/time/year_month_day/1.cc
index dcd88b92bbe..33ac4354d01 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/2.cc b/libstdc++-v3/testsuite/std/time/year_month_day/2.cc
index 6a0e3189968..b14985fe199 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/3.cc b/libstdc++-v3/testsuite/std/time/year_month_day/3.cc
index d2982728bbf..21916e28cc9 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day/3.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day/3.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/4.cc b/libstdc++-v3/testsuite/std/time/year_month_day/4.cc
index e76048d9965..3e72049c52c 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day/4.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day/4.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/io.cc b/libstdc++-v3/testsuite/std/time/year_month_day/io.cc
index 6c30a8721ea..636b30592c8 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day_last/1.cc b/libstdc++-v3/testsuite/std/time/year_month_day_last/1.cc
index 0420a26e411..5c89b7edbca 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day_last/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day_last/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day_last/2.cc b/libstdc++-v3/testsuite/std/time/year_month_day_last/2.cc
index c11fe9e90e6..5e14f2832c2 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day_last/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day_last/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_day_last/io.cc b/libstdc++-v3/testsuite/std/time/year_month_day_last/io.cc
index cb60f078c7e..0dcc1df9fb7 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_day_last/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_day_last/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday/1.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday/1.cc
index 2886bb2b6f7..f8ffe1cb510 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday/2.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday/2.cc
index 162f21fb2b3..dba993ae6fd 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday/3.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday/3.cc
index 01e93b4a88e..83d0dcf796d 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday/3.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday/3.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday/io.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday/io.cc
index 530429ff129..77fec80cca6 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/1.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/1.cc
index be711495e4d..583f7706cc7 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/1.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/1.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/2.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/2.cc
index 3a9796d66df..c7a1e31d20c 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/2.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/2.cc
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/io.cc b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/io.cc
index f6aff52f7eb..386f86875b3 100644
--- a/libstdc++-v3/testsuite/std/time/year_month_weekday_last/io.cc
+++ b/libstdc++-v3/testsuite/std/time/year_month_weekday_last/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/1.cc b/libstdc++-v3/testsuite/std/time/zoned_time/1.cc
index d9083048b54..1623aca1c7a 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/1.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 // { dg-require-effective-target cxx11_abi }
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/custom.cc b/libstdc++-v3/testsuite/std/time/zoned_time/custom.cc
index dc2d9c00c8d..83e1f6dca43 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/custom.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/custom.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target tzdb }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/deduction.cc b/libstdc++-v3/testsuite/std/time/zoned_time/deduction.cc
index a26a6f49d77..05bc275f592 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/deduction.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/deduction.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/io.cc b/libstdc++-v3/testsuite/std/time/zoned_time/io.cc
index ad85122e85d..6f3ed4d4672 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/io.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/io.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/req_neg.cc b/libstdc++-v3/testsuite/std/time/zoned_time/req_neg.cc
index ae51a250ee9..169dc6dae5c 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/req_neg.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/req_neg.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_time/requirements.cc b/libstdc++-v3/testsuite/std/time/zoned_time/requirements.cc
index 6334e589543..e7bf05e9474 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_time/requirements.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_time/requirements.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
diff --git a/libstdc++-v3/testsuite/std/time/zoned_traits.cc b/libstdc++-v3/testsuite/std/time/zoned_traits.cc
index 0cab8a2d47f..83cf6635127 100644
--- a/libstdc++-v3/testsuite/std/time/zoned_traits.cc
+++ b/libstdc++-v3/testsuite/std/time/zoned_traits.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target cxx11_abi }
 
-- 
2.41.0


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

* [PATCH 10/13] libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (8 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 09/13] libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 11/13] libstdc++: Remove dg-options "-std=gnu++23" from remaining tests Jonathan Wakely
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++23 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++26
as well.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/expected/assign.cc: Remove dg-options.
	* testsuite/20_util/expected/bad.cc: Likewise.
	* testsuite/20_util/expected/cons.cc: Likewise.
	* testsuite/20_util/expected/equality.cc: Likewise.
	* testsuite/20_util/expected/illformed_neg.cc: Likewise.
	* testsuite/20_util/expected/lwg3877.cc: Likewise.
	* testsuite/20_util/expected/lwg3938.cc: Likewise.
	* testsuite/20_util/expected/monadic.cc: Likewise.
	* testsuite/20_util/expected/observers.cc: Likewise.
	* testsuite/20_util/expected/requirements.cc: Likewise.
	* testsuite/20_util/expected/swap.cc: Likewise.
	* testsuite/20_util/expected/synopsis.cc: Likewise.
	* testsuite/20_util/expected/unexpected.cc: Likewise.
	* testsuite/20_util/expected/version.cc: Likewise.
---
 libstdc++-v3/testsuite/20_util/expected/assign.cc        | 1 -
 libstdc++-v3/testsuite/20_util/expected/bad.cc           | 1 -
 libstdc++-v3/testsuite/20_util/expected/cons.cc          | 1 -
 libstdc++-v3/testsuite/20_util/expected/equality.cc      | 1 -
 libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc | 1 -
 libstdc++-v3/testsuite/20_util/expected/lwg3877.cc       | 1 -
 libstdc++-v3/testsuite/20_util/expected/lwg3938.cc       | 1 -
 libstdc++-v3/testsuite/20_util/expected/monadic.cc       | 1 -
 libstdc++-v3/testsuite/20_util/expected/observers.cc     | 1 -
 libstdc++-v3/testsuite/20_util/expected/requirements.cc  | 1 -
 libstdc++-v3/testsuite/20_util/expected/swap.cc          | 1 -
 libstdc++-v3/testsuite/20_util/expected/synopsis.cc      | 1 -
 libstdc++-v3/testsuite/20_util/expected/unexpected.cc    | 1 -
 libstdc++-v3/testsuite/20_util/expected/version.cc       | 1 -
 14 files changed, 14 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/expected/assign.cc b/libstdc++-v3/testsuite/20_util/expected/assign.cc
index bbf5b900f4c..73f5cbcbfcd 100644
--- a/libstdc++-v3/testsuite/20_util/expected/assign.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/assign.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/bad.cc b/libstdc++-v3/testsuite/20_util/expected/bad.cc
index e5d7ba4afb0..c629e149da5 100644
--- a/libstdc++-v3/testsuite/20_util/expected/bad.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/bad.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/cons.cc b/libstdc++-v3/testsuite/20_util/expected/cons.cc
index 6946858198c..683174e98df 100644
--- a/libstdc++-v3/testsuite/20_util/expected/cons.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/cons.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/equality.cc b/libstdc++-v3/testsuite/20_util/expected/equality.cc
index 1862719e73d..db19b1510a7 100644
--- a/libstdc++-v3/testsuite/20_util/expected/equality.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/equality.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc b/libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc
index f1b0771aeb9..69c13b48a22 100644
--- a/libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/lwg3877.cc b/libstdc++-v3/testsuite/20_util/expected/lwg3877.cc
index 876275bfdb0..1854f5102c6 100644
--- a/libstdc++-v3/testsuite/20_util/expected/lwg3877.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/lwg3877.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 // LWG 3877. Incorrect constraints on const-qualified monadic overloads
diff --git a/libstdc++-v3/testsuite/20_util/expected/lwg3938.cc b/libstdc++-v3/testsuite/20_util/expected/lwg3938.cc
index c7e3758a902..3aa2b9d9273 100644
--- a/libstdc++-v3/testsuite/20_util/expected/lwg3938.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/lwg3938.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 // LWG 3938. Cannot use std::expected monadic ops with move-only error_type
diff --git a/libstdc++-v3/testsuite/20_util/expected/monadic.cc b/libstdc++-v3/testsuite/20_util/expected/monadic.cc
index d82774b0e1f..40f4907ea88 100644
--- a/libstdc++-v3/testsuite/20_util/expected/monadic.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/monadic.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/observers.cc b/libstdc++-v3/testsuite/20_util/expected/observers.cc
index 9bcd9edb809..35cc3d8f5a3 100644
--- a/libstdc++-v3/testsuite/20_util/expected/observers.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/observers.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/requirements.cc b/libstdc++-v3/testsuite/20_util/expected/requirements.cc
index aae7059ef71..c7ef5b603bf 100644
--- a/libstdc++-v3/testsuite/20_util/expected/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/requirements.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/swap.cc b/libstdc++-v3/testsuite/20_util/expected/swap.cc
index 08a110da47c..d37c7e0bf3f 100644
--- a/libstdc++-v3/testsuite/20_util/expected/swap.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/swap.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/synopsis.cc b/libstdc++-v3/testsuite/20_util/expected/synopsis.cc
index b0439614a27..237754dd780 100644
--- a/libstdc++-v3/testsuite/20_util/expected/synopsis.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/synopsis.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-normal-namespace "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/expected/unexpected.cc b/libstdc++-v3/testsuite/20_util/expected/unexpected.cc
index 050f8e3e81f..6a062cc9aa7 100644
--- a/libstdc++-v3/testsuite/20_util/expected/unexpected.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/unexpected.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <expected>
diff --git a/libstdc++-v3/testsuite/20_util/expected/version.cc b/libstdc++-v3/testsuite/20_util/expected/version.cc
index 98fccf73dc1..b592e641003 100644
--- a/libstdc++-v3/testsuite/20_util/expected/version.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 
 #include <version>
-- 
2.41.0


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

* [PATCH 11/13] libstdc++: Remove dg-options "-std=gnu++23" from remaining tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (9 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 10/13] libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 12/13] libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests Jonathan Wakely
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++23 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++26
as well.

libstdc++-v3/ChangeLog:

	* testsuite/18_support/headers/limits/synopsis_cxx23.cc: Remove
	dg-options.
	* testsuite/18_support/headers/stdfloat/types_std.cc: Likewise.
	* testsuite/18_support/type_info/constexpr.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/current.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/entry.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/synopsis.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/version.cc: Likewise.
	* testsuite/20_util/aligned_storage/deprecated-2b.cc: Likewise.
	* testsuite/20_util/aligned_union/deprecated-2b.cc: Likewise.
	* testsuite/20_util/bitset/access/constexpr.cc: Likewise.
	* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
	* testsuite/20_util/bitset/count/constexpr.cc: Likewise.
	* testsuite/20_util/bitset/ext/constexpr.cc: Likewise.
	* testsuite/20_util/bitset/operations/constexpr_c++23.cc:
	Likewise.
	* testsuite/20_util/bitset/version.cc: Likewise.
	* testsuite/20_util/from_chars/8.cc: Likewise.
	* testsuite/20_util/from_chars/constexpr.cc: Likewise.
	* testsuite/20_util/function/cons/deduction_c++23.cc: Likewise.
	* testsuite/20_util/function_objects/invoke/4.cc: Likewise.
	* testsuite/20_util/function_objects/invoke/dangling_ref.cc:
	Likewise.
	* testsuite/20_util/is_scoped_enum/value.cc: Likewise.
	* testsuite/20_util/is_scoped_enum/version.cc: Likewise.
	* testsuite/20_util/move_only_function/call.cc: Likewise.
	* testsuite/20_util/move_only_function/cons.cc: Likewise.
	* testsuite/20_util/move_only_function/move.cc: Likewise.
	* testsuite/20_util/move_only_function/version.cc: Likewise.
	* testsuite/20_util/optional/monadic/and_then.cc: Likewise.
	* testsuite/20_util/optional/monadic/or_else.cc: Likewise.
	* testsuite/20_util/optional/monadic/or_else_neg.cc: Likewise.
	* testsuite/20_util/optional/monadic/pr109242.cc: Likewise.
	* testsuite/20_util/optional/monadic/transform.cc: Likewise.
	* testsuite/20_util/pair/p2321r2.cc: Likewise.
	* testsuite/20_util/reference_from_temporary/value.cc: Likewise.
	* testsuite/20_util/reference_from_temporary/value2.cc:
	Likewise.
	* testsuite/20_util/reference_from_temporary/version.cc:
	Likewise.
	* testsuite/20_util/to_chars/constexpr.cc: Likewise.
	* testsuite/20_util/to_chars/float128_c++23.cc: Likewise.
	* testsuite/20_util/to_chars/float16_c++23.cc: Likewise.
	* testsuite/20_util/to_chars/version.cc: Likewise.
	* testsuite/20_util/to_underlying/1.cc: Likewise.
	* testsuite/20_util/to_underlying/version.cc: Likewise.
	* testsuite/20_util/tuple/p2321r2.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/constexpr.cc: Likewise.
	* testsuite/20_util/unique_ptr/comparison/constexpr.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/creation/constexpr.cc: Likewise.
	* testsuite/20_util/unique_ptr/modifiers/constexpr.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc: Likewise.
	* testsuite/20_util/unreachable/1.cc: Likewise.
	* testsuite/20_util/unreachable/version.cc: Likewise.
	* testsuite/20_util/uses_allocator/lwg3677.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/contains/char.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/contains/nonnull.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/contains/wchar_t.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/contains/char.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/contains/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc: Likewise.
	* testsuite/23_containers/queue/cons_from_iters.cc: Likewise.
	* testsuite/23_containers/stack/cons_from_iters.cc: Likewise.
	* testsuite/23_containers/vector/bool/element_access/1.cc:
	Likewise.
	* testsuite/24_iterators/const_iterator/1.cc: Likewise.
	* testsuite/25_algorithms/contains/1.cc: Likewise.
	* testsuite/25_algorithms/contains_subrange/1.cc: Likewise.
	* testsuite/25_algorithms/find_last/1.cc: Likewise.
	* testsuite/25_algorithms/find_last_if/1.cc: Likewise.
	* testsuite/25_algorithms/find_last_if_not/1.cc: Likewise.
	* testsuite/25_algorithms/fold_left/1.cc: Likewise.
	* testsuite/25_algorithms/fold_right/1.cc: Likewise.
	* testsuite/25_algorithms/iota/1.cc: Likewise.
	* testsuite/26_numerics/bit/bit.byteswap/byteswap.cc: Likewise.
	* testsuite/26_numerics/bit/bit.byteswap/version.cc: Likewise.
	* testsuite/26_numerics/complex/ext_c++23.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc:
	Likewise.
	* testsuite/26_numerics/headers/cmath/functions_std_c++23.cc:
	Likewise.
	* testsuite/26_numerics/headers/cmath/nextafter_c++23.cc:
	Likewise.
	* testsuite/26_numerics/numbers/4.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc: Likewise.
	* testsuite/27_io/filesystem/path/native/conv_c++23.cc:
	Likewise.
	* testsuite/27_io/spanstream/1.cc: Likewise.
	* testsuite/27_io/spanstream/2.cc: Likewise.
	* testsuite/27_io/spanstream/version.cc: Likewise.
	* testsuite/29_atomics/atomic_float/requirements_cxx23.cc:
	Likewise.
	* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
	Likewise.
	* testsuite/29_atomics/headers/stdatomic.h/version.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
	Likewise.
	* testsuite/experimental/filesystem/path/native/conv_c++23.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/adjacent/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/adjacent_transform/1.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/as_const/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/as_rvalue/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/chunk/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/chunk_by/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/enumerate/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/join_with/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3715.cc: Likewise.
	* testsuite/std/ranges/adaptors/slide/1.cc: Likewise.
	* testsuite/std/ranges/adaptors/stride/1.cc: Likewise.
	* testsuite/std/ranges/cartesian_product/1.cc: Likewise.
	* testsuite/std/ranges/range_adaptor_closure.cc: Likewise.
	* testsuite/std/ranges/repeat/1.cc: Likewise.
	* testsuite/std/ranges/version_c++23.cc: Likewise.
	* testsuite/std/ranges/zip/1.cc: Likewise.
	* testsuite/std/ranges/zip_transform/1.cc: Likewise.
---
 .../testsuite/18_support/headers/limits/synopsis_cxx23.cc       | 1 -
 libstdc++-v3/testsuite/18_support/headers/stdfloat/types_std.cc | 1 -
 libstdc++-v3/testsuite/18_support/type_info/constexpr.cc        | 2 +-
 libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc     | 2 +-
 libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc       | 2 +-
 libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc  | 2 +-
 libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc    | 1 -
 libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc     | 1 -
 libstdc++-v3/testsuite/20_util/aligned_storage/deprecated-2b.cc | 1 -
 libstdc++-v3/testsuite/20_util/aligned_union/deprecated-2b.cc   | 1 -
 libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc       | 1 -
 libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc   | 1 -
 libstdc++-v3/testsuite/20_util/bitset/count/constexpr.cc        | 1 -
 libstdc++-v3/testsuite/20_util/bitset/ext/constexpr.cc          | 1 -
 .../testsuite/20_util/bitset/operations/constexpr_c++23.cc      | 1 -
 libstdc++-v3/testsuite/20_util/bitset/version.cc                | 1 -
 libstdc++-v3/testsuite/20_util/from_chars/8.cc                  | 1 -
 libstdc++-v3/testsuite/20_util/from_chars/constexpr.cc          | 1 -
 libstdc++-v3/testsuite/20_util/function/cons/deduction_c++23.cc | 1 -
 libstdc++-v3/testsuite/20_util/function_objects/invoke/4.cc     | 1 -
 .../testsuite/20_util/function_objects/invoke/dangling_ref.cc   | 1 -
 libstdc++-v3/testsuite/20_util/is_scoped_enum/value.cc          | 1 -
 libstdc++-v3/testsuite/20_util/is_scoped_enum/version.cc        | 1 -
 libstdc++-v3/testsuite/20_util/move_only_function/call.cc       | 1 -
 libstdc++-v3/testsuite/20_util/move_only_function/cons.cc       | 1 -
 libstdc++-v3/testsuite/20_util/move_only_function/move.cc       | 1 -
 libstdc++-v3/testsuite/20_util/move_only_function/version.cc    | 1 -
 libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc     | 1 -
 libstdc++-v3/testsuite/20_util/optional/monadic/or_else.cc      | 1 -
 libstdc++-v3/testsuite/20_util/optional/monadic/or_else_neg.cc  | 1 -
 libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc     | 1 -
 libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc    | 1 -
 libstdc++-v3/testsuite/20_util/pair/p2321r2.cc                  | 1 -
 .../testsuite/20_util/reference_from_temporary/value.cc         | 1 -
 .../testsuite/20_util/reference_from_temporary/value2.cc        | 1 -
 .../testsuite/20_util/reference_from_temporary/version.cc       | 1 -
 libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc            | 1 -
 libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc       | 1 -
 libstdc++-v3/testsuite/20_util/to_chars/float16_c++23.cc        | 1 -
 libstdc++-v3/testsuite/20_util/to_chars/version.cc              | 1 -
 libstdc++-v3/testsuite/20_util/to_underlying/1.cc               | 1 -
 libstdc++-v3/testsuite/20_util/to_underlying/version.cc         | 1 -
 libstdc++-v3/testsuite/20_util/tuple/p2321r2.cc                 | 1 -
 libstdc++-v3/testsuite/20_util/unique_ptr/assign/constexpr.cc   | 1 -
 .../testsuite/20_util/unique_ptr/comparison/constexpr.cc        | 1 -
 .../testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc        | 1 -
 libstdc++-v3/testsuite/20_util/unique_ptr/creation/constexpr.cc | 1 -
 .../testsuite/20_util/unique_ptr/modifiers/constexpr.cc         | 1 -
 .../20_util/unique_ptr/specialized_algorithms/constexpr.cc      | 1 -
 libstdc++-v3/testsuite/20_util/unreachable/1.cc                 | 1 -
 libstdc++-v3/testsuite/20_util/unreachable/version.cc           | 1 -
 libstdc++-v3/testsuite/20_util/uses_allocator/lwg3677.cc        | 1 -
 .../basic_string/capacity/char/resize_and_overwrite.cc          | 1 -
 .../21_strings/basic_string/operations/contains/char.cc         | 1 -
 .../21_strings/basic_string/operations/contains/nonnull.cc      | 2 +-
 .../21_strings/basic_string/operations/contains/wchar_t.cc      | 1 -
 .../21_strings/basic_string_view/cons/char/range_c++20.cc       | 1 -
 .../21_strings/basic_string_view/cons/wchar_t/range_c++20.cc    | 1 -
 .../21_strings/basic_string_view/operations/contains/char.cc    | 1 -
 .../21_strings/basic_string_view/operations/contains/char/2.cc  | 1 -
 .../21_strings/basic_string_view/operations/contains/nonnull.cc | 2 +-
 .../21_strings/basic_string_view/operations/contains/wchar_t.cc | 1 -
 libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc   | 1 -
 libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc   | 1 -
 .../testsuite/23_containers/vector/bool/element_access/1.cc     | 1 -
 libstdc++-v3/testsuite/24_iterators/const_iterator/1.cc         | 1 -
 libstdc++-v3/testsuite/25_algorithms/contains/1.cc              | 1 -
 libstdc++-v3/testsuite/25_algorithms/contains_subrange/1.cc     | 1 -
 libstdc++-v3/testsuite/25_algorithms/find_last/1.cc             | 1 -
 libstdc++-v3/testsuite/25_algorithms/find_last_if/1.cc          | 1 -
 libstdc++-v3/testsuite/25_algorithms/find_last_if_not/1.cc      | 1 -
 libstdc++-v3/testsuite/25_algorithms/fold_left/1.cc             | 1 -
 libstdc++-v3/testsuite/25_algorithms/fold_right/1.cc            | 1 -
 libstdc++-v3/testsuite/25_algorithms/iota/1.cc                  | 1 -
 libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/byteswap.cc | 1 -
 libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/version.cc  | 1 -
 libstdc++-v3/testsuite/26_numerics/complex/ext_c++23.cc         | 1 -
 .../headers/cmath/c99_classification_macros_c++23.cc            | 1 -
 .../testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc  | 1 -
 .../testsuite/26_numerics/headers/cmath/functions_std_c++23.cc  | 1 -
 .../testsuite/26_numerics/headers/cmath/nextafter_c++23.cc      | 1 -
 libstdc++-v3/testsuite/26_numerics/numbers/4.cc                 | 1 -
 .../27_io/basic_ostream/inserters_other/char/volatile_ptr.cc    | 2 +-
 .../testsuite/27_io/filesystem/path/native/conv_c++23.cc        | 1 -
 libstdc++-v3/testsuite/27_io/spanstream/1.cc                    | 1 -
 libstdc++-v3/testsuite/27_io/spanstream/2.cc                    | 1 -
 libstdc++-v3/testsuite/27_io/spanstream/version.cc              | 1 -
 .../testsuite/29_atomics/atomic_float/requirements_cxx23.cc     | 1 -
 .../testsuite/29_atomics/headers/stdatomic.h/c_compat.cc        | 1 -
 .../testsuite/29_atomics/headers/stdatomic.h/version.cc         | 1 -
 .../testsuite/30_threads/packaged_task/cons/deduction_c++23.cc  | 1 -
 .../testsuite/experimental/filesystem/path/native/conv_c++23.cc | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc        | 1 -
 .../testsuite/std/ranges/adaptors/adjacent_transform/1.cc       | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc        | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/as_rvalue/1.cc       | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/chunk/1.cc           | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/chunk_by/1.cc        | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/enumerate/1.cc       | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc       | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3715.cc           | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/slide/1.cc           | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/stride/1.cc          | 1 -
 libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc        | 1 -
 libstdc++-v3/testsuite/std/ranges/range_adaptor_closure.cc      | 1 -
 libstdc++-v3/testsuite/std/ranges/repeat/1.cc                   | 1 -
 libstdc++-v3/testsuite/std/ranges/version_c++23.cc              | 1 -
 libstdc++-v3/testsuite/std/ranges/zip/1.cc                      | 1 -
 libstdc++-v3/testsuite/std/ranges/zip_transform/1.cc            | 1 -
 109 files changed, 7 insertions(+), 109 deletions(-)

diff --git a/libstdc++-v3/testsuite/18_support/headers/limits/synopsis_cxx23.cc b/libstdc++-v3/testsuite/18_support/headers/limits/synopsis_cxx23.cc
index 355eb2b2e69..2d9ea0503e7 100644
--- a/libstdc++-v3/testsuite/18_support/headers/limits/synopsis_cxx23.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/limits/synopsis_cxx23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 // { dg-require-normal-namespace "" }
 
diff --git a/libstdc++-v3/testsuite/18_support/headers/stdfloat/types_std.cc b/libstdc++-v3/testsuite/18_support/headers/stdfloat/types_std.cc
index 8a12abfbd6a..eb4d5ec017a 100644
--- a/libstdc++-v3/testsuite/18_support/headers/stdfloat/types_std.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/stdfloat/types_std.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 // Copyright (C) 2022-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc b/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc
index 6fb67b43f17..9390aa45f80 100644
--- a/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc
+++ b/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -frtti" }
+// { dg-options "-frtti" }
 // { dg-do compile { target c++23 } }
 // { dg-additional-options "-fdelete-null-pointer-checks" }
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc
index f6c860fc7a4..a27836d27af 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -lstdc++exp" }
+// { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target stacktrace }
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
index f0406953d03..ab016d56400 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -lstdc++exp" }
+// { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target stacktrace }
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
index 0a358b7b8ff..5dfa76951df 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -lstdc++exp" }
+// { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target stacktrace }
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc
index ece5d526fb9..faf7110b071 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target stacktrace }
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc
index d59a0696c25..ecfaf4165c3 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 // { dg-require-effective-target stacktrace }
 
diff --git a/libstdc++-v3/testsuite/20_util/aligned_storage/deprecated-2b.cc b/libstdc++-v3/testsuite/20_util/aligned_storage/deprecated-2b.cc
index a0e338a5843..fb6800b7999 100644
--- a/libstdc++-v3/testsuite/20_util/aligned_storage/deprecated-2b.cc
+++ b/libstdc++-v3/testsuite/20_util/aligned_storage/deprecated-2b.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/aligned_union/deprecated-2b.cc b/libstdc++-v3/testsuite/20_util/aligned_union/deprecated-2b.cc
index fa00a923856..18c71d9e29b 100644
--- a/libstdc++-v3/testsuite/20_util/aligned_union/deprecated-2b.cc
+++ b/libstdc++-v3/testsuite/20_util/aligned_union/deprecated-2b.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc b/libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc
index 53bb07f9498..6cf08b51306 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/access/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <bitset>
diff --git a/libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc b/libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc
index d308c2b2f10..871d17d9b04 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/cons/constexpr_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // This test relies on std::string.
 // { dg-require-effective-target hosted }
diff --git a/libstdc++-v3/testsuite/20_util/bitset/count/constexpr.cc b/libstdc++-v3/testsuite/20_util/bitset/count/constexpr.cc
index 98f8e2259e1..0832fcf9732 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/count/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/count/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <bitset>
diff --git a/libstdc++-v3/testsuite/20_util/bitset/ext/constexpr.cc b/libstdc++-v3/testsuite/20_util/bitset/ext/constexpr.cc
index 4bacefad14a..53709023256 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/ext/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/ext/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // This test relies on std::string.
 // { dg-require-effective-target hosted }
diff --git a/libstdc++-v3/testsuite/20_util/bitset/operations/constexpr_c++23.cc b/libstdc++-v3/testsuite/20_util/bitset/operations/constexpr_c++23.cc
index c594dd696a4..5ca209dd538 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/operations/constexpr_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/operations/constexpr_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <bitset>
diff --git a/libstdc++-v3/testsuite/20_util/bitset/version.cc b/libstdc++-v3/testsuite/20_util/bitset/version.cc
index 791ec43bf2d..1badb29507a 100644
--- a/libstdc++-v3/testsuite/20_util/bitset/version.cc
+++ b/libstdc++-v3/testsuite/20_util/bitset/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/8.cc b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
index d37460a655c..0b6d4008c76 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/8.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do run { target c++23 } }
 // { dg-add-options ieee }
 
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/constexpr.cc b/libstdc++-v3/testsuite/20_util/from_chars/constexpr.cc
index 6e146947c1f..1a19e70246b 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/deduction_c++23.cc b/libstdc++-v3/testsuite/20_util/function/cons/deduction_c++23.cc
index 856e0b845b8..132bfb8fbfe 100644
--- a/libstdc++-v3/testsuite/20_util/function/cons/deduction_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/function/cons/deduction_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/invoke/4.cc b/libstdc++-v3/testsuite/20_util/function_objects/invoke/4.cc
index 3ee6711f687..38367f70534 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/invoke/4.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/invoke/4.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 #include <functional>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/invoke/dangling_ref.cc b/libstdc++-v3/testsuite/20_util/function_objects/invoke/dangling_ref.cc
index 1513480bd8f..c274498aa43 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/invoke/dangling_ref.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/invoke/dangling_ref.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 #include <functional>
 
diff --git a/libstdc++-v3/testsuite/20_util/is_scoped_enum/value.cc b/libstdc++-v3/testsuite/20_util/is_scoped_enum/value.cc
index 61880cac5be..43dc03be8a8 100644
--- a/libstdc++-v3/testsuite/20_util/is_scoped_enum/value.cc
+++ b/libstdc++-v3/testsuite/20_util/is_scoped_enum/value.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/is_scoped_enum/version.cc b/libstdc++-v3/testsuite/20_util/is_scoped_enum/version.cc
index 93eea36c7ac..698cb48d3b3 100644
--- a/libstdc++-v3/testsuite/20_util/is_scoped_enum/version.cc
+++ b/libstdc++-v3/testsuite/20_util/is_scoped_enum/version.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/call.cc b/libstdc++-v3/testsuite/20_util/move_only_function/call.cc
index 3e159836412..bfc609afe37 100644
--- a/libstdc++-v3/testsuite/20_util/move_only_function/call.cc
+++ b/libstdc++-v3/testsuite/20_util/move_only_function/call.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/cons.cc b/libstdc++-v3/testsuite/20_util/move_only_function/cons.cc
index 44e9681b694..ffe2398f80c 100644
--- a/libstdc++-v3/testsuite/20_util/move_only_function/cons.cc
+++ b/libstdc++-v3/testsuite/20_util/move_only_function/cons.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/move.cc b/libstdc++-v3/testsuite/20_util/move_only_function/move.cc
index 0bed6edbf1a..51e31a6323d 100644
--- a/libstdc++-v3/testsuite/20_util/move_only_function/move.cc
+++ b/libstdc++-v3/testsuite/20_util/move_only_function/move.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/version.cc b/libstdc++-v3/testsuite/20_util/move_only_function/version.cc
index f33b82f8ca7..b051a63f729 100644
--- a/libstdc++-v3/testsuite/20_util/move_only_function/version.cc
+++ b/libstdc++-v3/testsuite/20_util/move_only_function/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc b/libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc
index c7e54efafee..a969ca5077e 100644
--- a/libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/monadic/and_then.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/monadic/or_else.cc b/libstdc++-v3/testsuite/20_util/optional/monadic/or_else.cc
index 05081046c80..de88a2ab5fe 100644
--- a/libstdc++-v3/testsuite/20_util/optional/monadic/or_else.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/monadic/or_else.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/monadic/or_else_neg.cc b/libstdc++-v3/testsuite/20_util/optional/monadic/or_else_neg.cc
index 16e94864f3b..f5028c15bc3 100644
--- a/libstdc++-v3/testsuite/20_util/optional/monadic/or_else_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/monadic/or_else_neg.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc b/libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc
index a25b6251589..d34319e8c27 100644
--- a/libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/monadic/pr109242.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc b/libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc
index b08837ee03b..b5dd3c09c87 100644
--- a/libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/monadic/transform.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <optional>
diff --git a/libstdc++-v3/testsuite/20_util/pair/p2321r2.cc b/libstdc++-v3/testsuite/20_util/pair/p2321r2.cc
index 4f436ee03d6..a09204ce796 100644
--- a/libstdc++-v3/testsuite/20_util/pair/p2321r2.cc
+++ b/libstdc++-v3/testsuite/20_util/pair/p2321r2.cc
@@ -1,5 +1,4 @@
 // Verify P2321R2 "zip" enhancements to std::pair.
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/reference_from_temporary/value.cc b/libstdc++-v3/testsuite/20_util/reference_from_temporary/value.cc
index ca02912afeb..2df559bd0dd 100644
--- a/libstdc++-v3/testsuite/20_util/reference_from_temporary/value.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_from_temporary/value.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/reference_from_temporary/value2.cc b/libstdc++-v3/testsuite/20_util/reference_from_temporary/value2.cc
index a06711a9a3b..23155648fcb 100644
--- a/libstdc++-v3/testsuite/20_util/reference_from_temporary/value2.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_from_temporary/value2.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <type_traits>
diff --git a/libstdc++-v3/testsuite/20_util/reference_from_temporary/version.cc b/libstdc++-v3/testsuite/20_util/reference_from_temporary/version.cc
index cb78f351e33..7f42c190961 100644
--- a/libstdc++-v3/testsuite/20_util/reference_from_temporary/version.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_from_temporary/version.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc b/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
index 10855b737c7..e51ea4dbbbe 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <charconv>
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
index 318a3563c8e..f1306263b88 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target ieee_floats }
 // { dg-require-effective-target size32plus }
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/float16_c++23.cc b/libstdc++-v3/testsuite/20_util/to_chars/float16_c++23.cc
index c6f81098ecf..4db53391ca9 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/float16_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/float16_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do run { target c++23 } }
 // { dg-require-effective-target ieee_floats }
 // { dg-require-effective-target size32plus }
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/version.cc b/libstdc++-v3/testsuite/20_util/to_chars/version.cc
index 2789afa28ef..440e2207aed 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/version.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/to_underlying/1.cc b/libstdc++-v3/testsuite/20_util/to_underlying/1.cc
index a215dfcb256..c970238b297 100644
--- a/libstdc++-v3/testsuite/20_util/to_underlying/1.cc
+++ b/libstdc++-v3/testsuite/20_util/to_underlying/1.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/to_underlying/version.cc b/libstdc++-v3/testsuite/20_util/to_underlying/version.cc
index 0a4df495004..f800d7c09e5 100644
--- a/libstdc++-v3/testsuite/20_util/to_underlying/version.cc
+++ b/libstdc++-v3/testsuite/20_util/to_underlying/version.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/20_util/tuple/p2321r2.cc b/libstdc++-v3/testsuite/20_util/tuple/p2321r2.cc
index ceed38b16ec..774968d87e5 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/p2321r2.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/p2321r2.cc
@@ -1,5 +1,4 @@
 // Verify P2321R2 "zip" enhancements to std::tuple.
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 // FIXME [!HOSTED]: avoidable std::allocator usage
 // { dg-require-effective-target hosted }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/constexpr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/constexpr.cc
index fb4acbda2d5..30f8d454f0e 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/comparison/constexpr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/comparison/constexpr.cc
index 83e4f0826a8..9c1da0b8251 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/comparison/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/comparison/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc
index 243d80aaba5..02cbd929c94 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/constexpr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/constexpr.cc
index f673342cb16..d972e29b514 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/constexpr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/constexpr.cc
index 81908fdc081..75678bc3e42 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc
index 91a0165d212..0c11a966bb7 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/unreachable/1.cc b/libstdc++-v3/testsuite/20_util/unreachable/1.cc
index 0c463d52a48..98d801b3969 100644
--- a/libstdc++-v3/testsuite/20_util/unreachable/1.cc
+++ b/libstdc++-v3/testsuite/20_util/unreachable/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/unreachable/version.cc b/libstdc++-v3/testsuite/20_util/unreachable/version.cc
index c7795900c30..b64a6cd82c0 100644
--- a/libstdc++-v3/testsuite/20_util/unreachable/version.cc
+++ b/libstdc++-v3/testsuite/20_util/unreachable/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3677.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3677.cc
index b2595d0eb22..c0789d74d86 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3677.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3677.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc
index 3265ebc3486..3c88b7c163b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/char.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/char.cc
index d8ebb50575c..fc96b7f3264 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/char.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/char.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/nonnull.cc
index 41bb3911390..f8002447be4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/nonnull.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -Wnonnull -O0 -Wno-unused-result" }
+// { dg-options "-Wnonnull -O0 -Wno-unused-result" }
 // { dg-do compile { target c++23 } }
 
 #include <string>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/wchar_t.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/wchar_t.cc
index 2d6b057b034..3fd7ef8e4f0 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/wchar_t.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/contains/wchar_t.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc
index 0d0fd0f3775..0e954cd2093 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc
index de224446724..8a4b23f13bc 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char.cc
index 84930f276c0..f59cad37722 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char/2.cc
index 19a8f5f251d..2f1b6848b76 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/char/2.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
index fafadcca01c..78d07b1669c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -Wnonnull -O0 -Wno-unused-result" }
+// { dg-options "-Wnonnull -O0 -Wno-unused-result" }
 // { dg-do compile { target c++23 } }
 
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc
index 8aad6b06388..02db4efcce5 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc b/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
index 1237d6ebc3a..334ef00b79e 100644
--- a/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
+++ b/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <queue>
diff --git a/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc b/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
index 2125df56eb6..77240952909 100644
--- a/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
+++ b/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <stack>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc
index 9016c026b33..2a430845058 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/element_access/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-xfail-if "not supported" { debug_mode } }
 
diff --git a/libstdc++-v3/testsuite/24_iterators/const_iterator/1.cc b/libstdc++-v3/testsuite/24_iterators/const_iterator/1.cc
index 51befd29541..8b74d110fdf 100644
--- a/libstdc++-v3/testsuite/24_iterators/const_iterator/1.cc
+++ b/libstdc++-v3/testsuite/24_iterators/const_iterator/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <iterator>
diff --git a/libstdc++-v3/testsuite/25_algorithms/contains/1.cc b/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
index 146ab593b70..7d3fa048ef6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/contains_subrange/1.cc b/libstdc++-v3/testsuite/25_algorithms/contains_subrange/1.cc
index 6c3c99c0fd6..5482cc18575 100644
--- a/libstdc++-v3/testsuite/25_algorithms/contains_subrange/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/contains_subrange/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc b/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
index ef5844c8afd..911e22887d1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_last_if/1.cc b/libstdc++-v3/testsuite/25_algorithms/find_last_if/1.cc
index 0a723475dec..1e880b35a30 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_last_if/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_last_if/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_last_if_not/1.cc b/libstdc++-v3/testsuite/25_algorithms/find_last_if_not/1.cc
index 98aa94b7f2c..907c24ac19e 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_last_if_not/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_last_if_not/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fold_left/1.cc b/libstdc++-v3/testsuite/25_algorithms/fold_left/1.cc
index 4041d13315f..b08a0651174 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fold_left/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fold_left/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/fold_right/1.cc b/libstdc++-v3/testsuite/25_algorithms/fold_right/1.cc
index b08b57c6364..207d51f5a73 100644
--- a/libstdc++-v3/testsuite/25_algorithms/fold_right/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/fold_right/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/iota/1.cc b/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
index ad2bf08adf5..61bf418b4da 100644
--- a/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/byteswap.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/byteswap.cc
index 19f852f8e84..034019b3da2 100644
--- a/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/byteswap.cc
+++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/byteswap.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 #include <bit>
diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/version.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/version.cc
index ffe2566dbc9..c179944e6e8 100644
--- a/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/version.cc
+++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.byteswap/version.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/ext_c++23.cc b/libstdc++-v3/testsuite/26_numerics/complex/ext_c++23.cc
index 68edcd2a95a..f84545775f4 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/ext_c++23.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/ext_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do link { target c++23 } }
 
 #include <stdfloat>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc
index 50612fc1edd..653e228ec28 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do link { target c++23 } }
 // { dg-excess-errors "" { target uclibc } }
 
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc
index 5800f3b6a39..efcebe49b29 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do link { target c++23 } }
 
 #include <stdfloat>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc
index ce529af36d6..d9acc6a34a0 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do link { target c++23 } }
 
 #include <stdfloat>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc
index 462a6012f2c..874507699fa 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do run { target c++23 } }
 
 #include <stdfloat>
diff --git a/libstdc++-v3/testsuite/26_numerics/numbers/4.cc b/libstdc++-v3/testsuite/26_numerics/numbers/4.cc
index e89167e086f..990a1670a97 100644
--- a/libstdc++-v3/testsuite/26_numerics/numbers/4.cc
+++ b/libstdc++-v3/testsuite/26_numerics/numbers/4.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 #include <numbers>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc
index 151e13d3bdd..1a7d25da5d5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++23 -fno-inline" }
+// { dg-options "-fno-inline" }
 // { dg-do run { target c++23 } }
 
 #include <sstream>
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/native/conv_c++23.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/native/conv_c++23.cc
index b4efed2bd47..35b0e8b56b7 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/native/conv_c++23.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/native/conv_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <filesystem>
diff --git a/libstdc++-v3/testsuite/27_io/spanstream/1.cc b/libstdc++-v3/testsuite/27_io/spanstream/1.cc
index b66ee60ec92..bd45a38ae3c 100644
--- a/libstdc++-v3/testsuite/27_io/spanstream/1.cc
+++ b/libstdc++-v3/testsuite/27_io/spanstream/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <spanstream>
diff --git a/libstdc++-v3/testsuite/27_io/spanstream/2.cc b/libstdc++-v3/testsuite/27_io/spanstream/2.cc
index a13a50b0dce..6b5f62275b2 100644
--- a/libstdc++-v3/testsuite/27_io/spanstream/2.cc
+++ b/libstdc++-v3/testsuite/27_io/spanstream/2.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <spanstream>
diff --git a/libstdc++-v3/testsuite/27_io/spanstream/version.cc b/libstdc++-v3/testsuite/27_io/spanstream/version.cc
index 26077c94630..7434e3b292e 100644
--- a/libstdc++-v3/testsuite/27_io/spanstream/version.cc
+++ b/libstdc++-v3/testsuite/27_io/spanstream/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_float/requirements_cxx23.cc b/libstdc++-v3/testsuite/29_atomics/atomic_float/requirements_cxx23.cc
index df1562d874d..04393a76cb4 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_float/requirements_cxx23.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/requirements_cxx23.cc
@@ -15,7 +15,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2b" }
 // { dg-do compile { target c++23 } }
 
 #include <atomic>
diff --git a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc
index 3364c60a225..70d37d4d8cd 100644
--- a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc
+++ b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <stdatomic.h>
diff --git a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/version.cc b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/version.cc
index ab74fe60934..26fa76d0229 100644
--- a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/version.cc
+++ b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/version.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 
 // <stdatomic.h> is not freestanding.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/deduction_c++23.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/deduction_c++23.cc
index e36edfa0359..6a43cf945d8 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/deduction_c++23.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/deduction_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 
 #include <future>
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/native/conv_c++23.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/native/conv_c++23.cc
index 81f57549ac9..e5e20cd0565 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/native/conv_c++23.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/native/conv_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do compile { target c++23 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc
index 19640abfe93..b83743a745c 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent_transform/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent_transform/1.cc
index c32c639e815..6aeedbaa648 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent_transform/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent_transform/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
index ac1be7440e4..48c7d38a0a3 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/as_rvalue/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/as_rvalue/1.cc
index da829606e06..74223a699b6 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/as_rvalue/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/as_rvalue/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/chunk/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/chunk/1.cc
index 18b934f99ee..7b8d4bacc0c 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/chunk/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/chunk/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/chunk_by/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/chunk_by/1.cc
index a8fceb105e0..656c3c0d15e 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/chunk_by/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/chunk_by/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/enumerate/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/enumerate/1.cc
index 445d9854c8c..d5221680d6b 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/enumerate/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/enumerate/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
index 15127c0715f..7bed169d127 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3715.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3715.cc
index 96ee7087be0..b42762dc807 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3715.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3715.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 // Verify LWG 3715 changes.
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/slide/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/slide/1.cc
index 8c015c1162b..8dfb8715e5a 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/slide/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/slide/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/stride/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/stride/1.cc
index 92aca35e83f..dfc413dbb66 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/stride/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/stride/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc b/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
index ef2ece4a168..8938e92158d 100644
--- a/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/cartesian_product/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/range_adaptor_closure.cc b/libstdc++-v3/testsuite/std/ranges/range_adaptor_closure.cc
index 6221f071331..104fd221a0d 100644
--- a/libstdc++-v3/testsuite/std/ranges/range_adaptor_closure.cc
+++ b/libstdc++-v3/testsuite/std/ranges/range_adaptor_closure.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/repeat/1.cc b/libstdc++-v3/testsuite/std/ranges/repeat/1.cc
index c62122c078f..30636407ee2 100644
--- a/libstdc++-v3/testsuite/std/ranges/repeat/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/repeat/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/version_c++23.cc b/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
index 64b7df409c9..f68df67d3b3 100644
--- a/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
+++ b/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do preprocess { target c++23 } }
 
 #include <version>
diff --git a/libstdc++-v3/testsuite/std/ranges/zip/1.cc b/libstdc++-v3/testsuite/std/ranges/zip/1.cc
index 8ca386d6563..f7c2c00a2cd 100644
--- a/libstdc++-v3/testsuite/std/ranges/zip/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/zip/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/zip_transform/1.cc b/libstdc++-v3/testsuite/std/ranges/zip_transform/1.cc
index d858b02f199..20abdcba0f8 100644
--- a/libstdc++-v3/testsuite/std/ranges/zip_transform/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/zip_transform/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++23" }
 // { dg-do run { target c++23 } }
 
 #include <ranges>
-- 
2.41.0


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

* [PATCH 12/13] libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (10 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 11/13] libstdc++: Remove dg-options "-std=gnu++23" from remaining tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-11 16:16 ` [PATCH 13/13] libstdc++: Simplify dejagnu directives for some tests using threads Jonathan Wakely
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

We can also combine the { dg-require-effective-target c++2a } directive
with the dg-do selector.

We need to add the no_pch options for tests that define
_GLIBCXX_ASSERTIONS in the test, otherwise the PCH is included without
that defined.

libstdc++-v3/ChangeLog:

	* testsuite/23_containers/span/back_assert_neg.cc: Remove
	dg-options and add effective target selector to dg-do. Add
	no_pch.
	* testsuite/23_containers/span/back_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/first_neg.cc: Likewise.
	* testsuite/23_containers/span/front_assert_neg.cc: Likewise.
	* testsuite/23_containers/span/front_neg.cc: Likewise.
	* testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
	* testsuite/23_containers/span/index_op_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/last_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/span/subspan_neg.cc: Likewise.
	* testsuite/24_iterators/range_operations/advance_debug_neg.cc:
	Likewise.
---
 libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/back_neg.cc        | 3 +--
 .../testsuite/23_containers/span/cons_1_assert_neg.cc        | 5 ++---
 .../testsuite/23_containers/span/cons_2_assert_neg.cc        | 5 ++---
 .../testsuite/23_containers/span/first_2_assert_neg.cc       | 5 ++---
 .../testsuite/23_containers/span/first_assert_neg.cc         | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/first_neg.cc       | 3 +--
 .../testsuite/23_containers/span/front_assert_neg.cc         | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/front_neg.cc       | 3 +--
 .../testsuite/23_containers/span/index_op_assert_neg.cc      | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/index_op_neg.cc    | 3 +--
 .../testsuite/23_containers/span/last_2_assert_neg.cc        | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/last_neg.cc        | 3 +--
 .../testsuite/23_containers/span/subspan_2_assert_neg.cc     | 5 ++---
 .../testsuite/23_containers/span/subspan_3_assert_neg.cc     | 5 ++---
 .../testsuite/23_containers/span/subspan_4_assert_neg.cc     | 5 ++---
 .../testsuite/23_containers/span/subspan_5_assert_neg.cc     | 5 ++---
 .../testsuite/23_containers/span/subspan_6_assert_neg.cc     | 5 ++---
 .../testsuite/23_containers/span/subspan_assert_neg.cc       | 5 ++---
 libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc     | 3 +--
 .../24_iterators/range_operations/advance_debug_neg.cc       | 5 ++---
 22 files changed, 38 insertions(+), 60 deletions(-)

diff --git a/libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc
index 2b4dee6df9a..b42aea3b4b4 100644
--- a/libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/back_neg.cc b/libstdc++-v3/testsuite/23_containers/span/back_neg.cc
index 01083e60168..d3ea4f405f4 100644
--- a/libstdc++-v3/testsuite/23_containers/span/back_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/back_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/23_containers/span/cons_1_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/cons_1_assert_neg.cc
index 2f555125453..10208469cba 100644
--- a/libstdc++-v3/testsuite/23_containers/span/cons_1_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/cons_1_assert_neg.cc
@@ -1,6 +1,5 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_DEBUG
 #define _GLIBCXX_DEBUG
diff --git a/libstdc++-v3/testsuite/23_containers/span/cons_2_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/cons_2_assert_neg.cc
index efef0e608ba..e3a3a2678c6 100644
--- a/libstdc++-v3/testsuite/23_containers/span/cons_2_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/cons_2_assert_neg.cc
@@ -1,6 +1,5 @@
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_DEBUG
 #define _GLIBCXX_DEBUG
diff --git a/libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc
index 93cd095495a..876a6b773d6 100644
--- a/libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc
index 4ff56bf65cf..f1d8cdccb9b 100644
--- a/libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/first_neg.cc b/libstdc++-v3/testsuite/23_containers/span/first_neg.cc
index 8ed68296263..4a8cd184172 100644
--- a/libstdc++-v3/testsuite/23_containers/span/first_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/first_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc
index 2d4320d0fd9..12cbd4a80ae 100644
--- a/libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/front_neg.cc b/libstdc++-v3/testsuite/23_containers/span/front_neg.cc
index f8e8100bd7c..b5525db8f1d 100644
--- a/libstdc++-v3/testsuite/23_containers/span/front_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/front_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc
index b2633cbfaab..c75924e5f38 100644
--- a/libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/index_op_neg.cc b/libstdc++-v3/testsuite/23_containers/span/index_op_neg.cc
index 8bbe8ea0737..6e8cd4903b3 100644
--- a/libstdc++-v3/testsuite/23_containers/span/index_op_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/index_op_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc
index 906896911c0..a464fa516b0 100644
--- a/libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc
index 59cd44acc3c..f36db455519 100644
--- a/libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/last_neg.cc b/libstdc++-v3/testsuite/23_containers/span/last_neg.cc
index 9c360d2650e..2e86233f19a 100644
--- a/libstdc++-v3/testsuite/23_containers/span/last_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/last_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc
index 488b5606993..12b79fffc5d 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc
index 8324edfc49a..3130a503534 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc
index b1dbfe6902e..2a57ddf48b8 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc
index 2102fd02cce..48aaeaffbbf 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc
index c003561032c..2c90c5e67f8 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc
index c46b78fe8bc..4873c757996 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-do run { target c++20 xfail *-*-* } }
+// { dg-add-options no_pch }
 
 #undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
diff --git a/libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc b/libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc
index 205bafd39dd..3c69f236755 100644
--- a/libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <span>
 
diff --git a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
index 4d363c41f7c..b9511822e19 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_operations/advance_debug_neg.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { xfail *-*-* } }
-// { dg-require-effective-target c++2a }
+// { dg-options "-D_GLIBCXX_ASSERTIONS" }
+// { dg-do run { target c++20 xfail *-*-* } }
 
 #include <iterator>
 #include <testsuite_iterators.h>
-- 
2.41.0


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

* [PATCH 13/13] libstdc++: Simplify dejagnu directives for some tests using threads
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (11 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 12/13] libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests Jonathan Wakely
@ 2023-09-11 16:16 ` Jonathan Wakely
  2023-09-12 13:05 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
  2023-09-15 23:04 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-11 16:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches

Replace dg-require-effective-target directives with a target selector on
the dg-do directive.

We can also remove { dg-require-effective-target pthread } and the
associated { dg-options "-pthread" } by allowing it to run on
non-pthread targets and conditionally adding -pthread only for pthread
targets.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/shared_ptr/atomic/3.cc: Simplify dg
	directives.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/allocate.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/cons.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/cons_single.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/is_equal.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/multithreaded.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/options.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/release.cc:
	Likewise.
	* testsuite/20_util/synchronized_pool_resource/release_single.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_callback/destroy.cc:
	Likewise.
---
 libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc       | 3 +--
 .../20_util/shared_ptr/thread/default_weaktoshared.cc       | 3 +--
 .../20_util/shared_ptr/thread/mutex_weaktoshared.cc         | 3 +--
 .../20_util/synchronized_pool_resource/allocate.cc          | 6 ++----
 .../20_util/synchronized_pool_resource/allocate_single.cc   | 3 +--
 .../testsuite/20_util/synchronized_pool_resource/cons.cc    | 6 ++----
 .../20_util/synchronized_pool_resource/cons_single.cc       | 3 +--
 .../20_util/synchronized_pool_resource/is_equal.cc          | 6 ++----
 .../20_util/synchronized_pool_resource/multithreaded.cc     | 6 ++----
 .../testsuite/20_util/synchronized_pool_resource/options.cc | 6 ++----
 .../testsuite/20_util/synchronized_pool_resource/release.cc | 6 ++----
 .../20_util/synchronized_pool_resource/release_single.cc    | 3 +--
 .../30_threads/condition_variable_any/stop_token/wait_on.cc | 6 ++----
 .../30_threads/stop_token/stop_callback/deadlock-mt.cc      | 5 ++---
 .../30_threads/stop_token/stop_callback/destroy.cc          | 5 ++---
 15 files changed, 24 insertions(+), 46 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
index 8346191412c..19efcadb7ec 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
@@ -1,6 +1,5 @@
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2023 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
index 20c910c2fcd..af0e65e9469 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
@@ -17,10 +17,9 @@
 
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
index d6c8611aa85..07f7c49bf10 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
@@ -17,10 +17,9 @@
 
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
-// { dg-do run }
+// { dg-do run { target c++11 } }
 // { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
index f9a4a2f3694..822a410b6c2 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
index a29575fdd80..4acfde6e9d7 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/allocate_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as allocate.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
index f8b74d9d8cc..a3f98586684 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
index ab215ba3c93..9668a51c346 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/cons_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as cons.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
index 5be6bd69663..aacf00b079c 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/is_equal.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
index a7283bf5405..7992367ffda 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/multithreaded.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
index a869b993ee3..9d98b5038db 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/options.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
index d1c60432dd7..6752d6e270c 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release.cc
@@ -15,10 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-options "-pthread" }
-// { dg-require-effective-target c++17 }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <memory_resource>
diff --git a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
index f69e96034ad..9645bc64c02 100644
--- a/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
+++ b/libstdc++-v3/testsuite/20_util/synchronized_pool_resource/release_single.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run }
-// { dg-require-effective-target c++17 }
+// { dg-do run { target c++17 } }
 // { dg-require-gthreads "" }
 
 // This runs the same tests as release.cc but without -pthread
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
index edebaa6acab..bac1f3509b5 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
@@ -15,11 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread" }
 // { dg-add-options libatomic }
-// { dg-do run }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 
 #include <condition_variable>
 #include <thread>
diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
index f6162879e54..e780955dbec 100644
--- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
+++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc
@@ -15,10 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread"  }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <stop_token>
diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
index 6bdd4d13f54..f13761ca0fe 100644
--- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
+++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc
@@ -15,10 +15,9 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread"  }
 // { dg-add-options libatomic }
-// { dg-require-effective-target c++2a }
-// { dg-require-effective-target pthread }
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 #include <stop_token>
-- 
2.41.0


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

* Re: [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (12 preceding siblings ...)
  2023-09-11 16:16 ` [PATCH 13/13] libstdc++: Simplify dejagnu directives for some tests using threads Jonathan Wakely
@ 2023-09-12 13:05 ` Jonathan Wakely
  2023-09-12 13:39   ` [PATCH 14/13] libstdc++: Re-initialize static data files used by tests Jonathan Wakely
  2023-09-15 23:04 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
  14 siblings, 1 reply; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-12 13:05 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On Mon, 11 Sept 2023 at 17:37, Jonathan Wakely via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> This patch series replicates the behaviour of the g++ testsuite, so that
> libstdc++ tests can easily be run for multiple different -std options in
> a single testsuite run.  As described in the updated docs, the -std
> options to use for every test can be overridden by setting v3_std_list
> in ~/.dejagnurc or $DEJAGNU, or setting $GLIBCXX_TESTSUITE_STDS in the
> environment.  If not overridden, the default is just to run with
> -std=gnu++17 (so that we don't increase the time taken for a full
> testsuite run).
>
> Tests that require a newer standard than C++17 will default to that
> newer standard and C++26, so e.g. std::format tests will be run with
> both -std=gnu++20 and -std=gnu++26.  This does increase the number of
> tests, but only for the subset of tests for C++20/23/26 features.  If
> this is too costly for testers, we can change that (this might be
> needed, because the C++20 tests for std::ranges and std::format are
> particularly slow to compile).
>
> Because a correct default will be chosen for tests that require
> something newer than C++17, we no longer need dg-options "-std=gnu++20"
> or similar in any tests.  Removing the explicit -std option allows the
> test to be run for later standards via the v3_std_list settings, so that
> we can verify that C++20 features still work in C++23 and C++26, for
> example.  This change already found some tests which failed when run
> with a later standard (see r14-3771-gf12e26f3496275).
>
> Patches 2-13 in the series remove those unnecessary dg-options from
> about half the relevant tests, but there are more than 500 others that
> still need adjusting.
>
> We can remove files like testsuite/std/format/functions/format_c++23.cc
> which only exist to duplicate existing tests with a different -std
> option.  We can remove that file now, and rely on format.cc being run
> with multiple -std options by libstdc++ maintainers.
>
> It might also be useful to add a 'make check-quick' target which runs a
> small subset of smoke tests with every standard version in v3_std_list.
> This would be a suitable target for CI bots and for packagers who want
> to verify that a build of GCC is functional, without running the entire
> libstdc++ testsuite.

There's a problem with this change. Some of our tests fail if they're
run more than once.

We have some static data files which are copied into the test
directory by libstdc++_init at the start of the run. But some tests
modify those files, so if the same test gets run multiple times, the
file is no longer in the expected state after the first test.

This only shows up when overriding the list of -std modes to include
more than one option. The tests pass on the first run, and fail for
subsequent ones:

Running /home/test/src/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
...
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++98 (test for
excess errors)
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++98 execution test
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++11 (test for
excess errors)
FAIL: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++11 execution test
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++14 (test for
excess errors)
FAIL: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++14 execution test
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++17 (test for
excess errors)
FAIL: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++17 execution test
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++20 (test for
excess errors)
FAIL: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++20 execution test
PASS: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++23 (test for
excess errors)
FAIL: 27_io/basic_filebuf/seekoff/char/1-io.cc  -std=gnu++23 execution test

We either need to copy the data files again after each test, or
rewrite the tests to be idempotent.


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

* [PATCH 14/13] libstdc++: Re-initialize static data files used by tests
  2023-09-12 13:05 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
@ 2023-09-12 13:39   ` Jonathan Wakely
  0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-12 13:39 UTC (permalink / raw)
  To: libstdc++, gcc-patches

This fixes the problem observed with some filebuf tests.

The "@require@" string seems a bit hacky, as I don't know why that
string is in the tests in the first palce ... but it is there, so this
works.

-- > 8--

Some tests rely on text files with specific content being present in the
test directory. Because the tests modify those files, running the same
test more than once in the same directory will FAIL because the content
of the file is not in the expected state.

This uses a "@require@" marker that happens to be present in those tests
to decide when we need to copy the original files into the test dir
again, so that repeated tests always see the initial file content.

libstdc++-v3/ChangeLog:

	* testsuite/lib/libstdc++.exp (v3-init-data-files): New proc.
	(libstdc++_init): Use v3-init-data-files.
	(v3-dg-runtest): Use v3-init-data-files to update test data
	files for repeated tests.
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 2c497707184..daace4c1d59 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -102,6 +102,12 @@ proc v3-copy-files {srcfiles} {
     }
 }
 
+proc v3-init-data-files { } {
+    global srcdir
+    v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"]
+    v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"]
+}
+
 # Called once, during runtest.exp setup.
 proc libstdc++_init { testfile } {
     global env
@@ -159,8 +165,7 @@ proc libstdc++_init { testfile } {
     set dg-do-what-default run
 
     # Copy any required data files.
-    v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"]
-    v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"]
+    v3-init-data-files
 
     set ld_library_path_tmp ""
 
@@ -556,11 +561,26 @@ proc v3-dg-runtest { testcases flags default-extra-flags } {
 	    set option_list { "" }
 	}
 
+	# Some tests (e.g. 27_io/basic_filebuf/seek{off,pos}/char/[12]-io.cc)
+	# rely on text files with specific data being present in the test dir.
+	# Because the tests modify those files, running the same test a second
+	# time will FAIL due to the files not being in their initial state.
+	# We rely on the fact that those files contain a "@require@" comment
+	# to trigger creating fresh copies of the files for repeated tests.
+	if [search_for $test "@require@"] {
+	    set need_fresh_data_files [llength $option_list]
+	} else {
+	    set need_fresh_data_files 0
+	}
+
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
 	foreach flags_t $option_list {
 	    verbose "Testing $nshort, $flags $flags_t" 1
 	    dg-test $test "$flags $flags_t" ${default-extra-flags}
+	    if { $need_fresh_data_files > 1 } {
+		v3-init-data-files
+	    }
 	}
     }
 }
-- 
2.41.0


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

* [PATCH v2 6/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests
  2023-09-11 16:16 ` [PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests Jonathan Wakely
@ 2023-09-15 20:54   ` Jonathan Wakely
  0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-15 20:54 UTC (permalink / raw)
  To: libstdc++, gcc-patches

This is v2 of patch 6/13, because I missed three files in the first
patch.

Tested aarch64-linux. I intend to push this (and the rest of the series)
soon.

-- >8 --

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

	* testsuite/std/concepts/1.cc: Remove dg-options.
	* testsuite/std/concepts/2.cc: Likewise.
	* testsuite/std/concepts/concepts.callable/invocable.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/regular_invocable.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/relation.cc:
	Likewise.
	* testsuite/std/concepts/concepts.callable/strictweakorder.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.assignable/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.common/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.commonref/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.constructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.destructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.same/1.cc:
	Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc: Likewise.
	* testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc: Likewise.
	* testsuite/std/concepts/concepts.object/copyable.cc: Likewise.
	* testsuite/std/concepts/concepts.object/movable.cc: Likewise.
	* testsuite/std/concepts/concepts.object/regular.cc: Likewise.
	* testsuite/std/concepts/concepts.object/semiregular.cc:
	Likewise.
	* testsuite/std/ranges/97600.cc: Likewise.
	* testsuite/std/ranges/access/101782.cc: Likewise.
	* testsuite/std/ranges/access/begin.cc: Likewise.
	* testsuite/std/ranges/access/begin_neg.cc: Likewise.
	* testsuite/std/ranges/access/cbegin.cc: Likewise.
	* testsuite/std/ranges/access/cdata.cc: Likewise.
	* testsuite/std/ranges/access/cend.cc: Likewise.
	* testsuite/std/ranges/access/crbegin.cc: Likewise.
	* testsuite/std/ranges/access/crend.cc: Likewise.
	* testsuite/std/ranges/access/data.cc: Likewise.
	* testsuite/std/ranges/access/empty.cc: Likewise.
	* testsuite/std/ranges/access/end.cc: Likewise.
	* testsuite/std/ranges/access/end_neg.cc: Likewise.
	* testsuite/std/ranges/access/lwg3467.cc: Likewise.
	* testsuite/std/ranges/access/p2602.cc: Likewise.
	* testsuite/std/ranges/access/rbegin.cc: Likewise.
	* testsuite/std/ranges/access/rend.cc: Likewise.
	* testsuite/std/ranges/access/size.cc: Likewise.
	* testsuite/std/ranges/access/size_neg.cc: Likewise.
	* testsuite/std/ranges/access/ssize.cc: Likewise.
	* testsuite/std/ranges/adaptors/100479.cc: Likewise.
	* testsuite/std/ranges/adaptors/100577.cc: Likewise.
	* testsuite/std/ranges/adaptors/93978.cc: Likewise.
	* testsuite/std/ranges/adaptors/95322.cc: Likewise.
	* testsuite/std/ranges/adaptors/99433.cc: Likewise.
	* testsuite/std/ranges/adaptors/all.cc: Likewise.
	* testsuite/std/ranges/adaptors/common.cc: Likewise.
	* testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/counted.cc: Likewise.
	* testsuite/std/ranges/adaptors/detail/copyable_box.cc:
	Likewise.
	* testsuite/std/ranges/adaptors/drop.cc: Likewise.
	* testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
	* testsuite/std/ranges/adaptors/elements.cc: Likewise.
	* testsuite/std/ranges/adaptors/filter.cc: Likewise.
	* testsuite/std/ranges/adaptors/join.cc: Likewise.
	* testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
	* testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3286.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3313_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3325_neg.cc: Likewise.
	* testsuite/std/ranges/adaptors/lwg3406.cc: Likewise.
	* testsuite/std/ranges/adaptors/p1739.cc: Likewise.
	* testsuite/std/ranges/adaptors/p2281.cc: Likewise.
	* testsuite/std/ranges/adaptors/p2770r0.cc: Likewise.
	* testsuite/std/ranges/adaptors/reverse.cc: Likewise.
	* testsuite/std/ranges/adaptors/sizeof.cc: Likewise.
	* testsuite/std/ranges/adaptors/split.cc: Likewise.
	* testsuite/std/ranges/adaptors/take.cc: Likewise.
	* testsuite/std/ranges/adaptors/take_while.cc: Likewise.
	* testsuite/std/ranges/adaptors/transform.cc: Likewise.
	* testsuite/std/ranges/empty_view.cc: Likewise.
	* testsuite/std/ranges/headers/ranges/synopsis.cc: Likewise.
	* testsuite/std/ranges/iota/difference_type.cc: Likewise.
	* testsuite/std/ranges/iota/iota_view.cc: Likewise.
	* testsuite/std/ranges/iota/iterator.cc: Likewise.
	* testsuite/std/ranges/iota/lwg3292_neg.cc: Likewise.
	* testsuite/std/ranges/iota/max_size_type.cc: Likewise.
	* testsuite/std/ranges/istream_view.cc: Likewise.
	* testsuite/std/ranges/p2259.cc: Likewise.
	* testsuite/std/ranges/p2325.cc: Likewise.
	* testsuite/std/ranges/p2367.cc: Likewise.
	* testsuite/std/ranges/range.cc: Likewise.
	* testsuite/std/ranges/refinements.cc: Likewise.
	* testsuite/std/ranges/safe_range.cc: Likewise.
	* testsuite/std/ranges/safe_range_types.cc: Likewise.
	* testsuite/std/ranges/single_view.cc: Likewise.
	* testsuite/std/ranges/sized.cc: Likewise.
	* testsuite/std/ranges/subrange/1.cc: Likewise.
	* testsuite/std/ranges/subrange/97512.cc: Likewise.
	* testsuite/std/ranges/subrange/constexpr.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3282_neg.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3286.cc: Likewise.
	* testsuite/std/ranges/subrange/lwg3433.cc: Likewise.
	* testsuite/std/ranges/subrange/sizeof.cc: Likewise.
	* testsuite/std/ranges/subrange/tuple_like.cc: Likewise.
	* testsuite/std/ranges/view.cc: Likewise.
---
 libstdc++-v3/testsuite/std/concepts/1.cc                   | 3 +--
 libstdc++-v3/testsuite/std/concepts/2.cc                   | 3 +--
 .../testsuite/std/concepts/concepts.callable/invocable.cc  | 3 +--
 .../std/concepts/concepts.callable/regular_invocable.cc    | 3 +--
 .../testsuite/std/concepts/concepts.callable/relation.cc   | 3 +--
 .../std/concepts/concepts.callable/strictweakorder.cc      | 3 +--
 .../concepts.lang/concept.arithmetic/floating_point.cc     | 3 +--
 .../concepts/concepts.lang/concept.arithmetic/integral.cc  | 3 +--
 .../concepts.lang/concept.arithmetic/signed_integral.cc    | 3 +--
 .../concepts.lang/concept.arithmetic/unsigned_integral.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.assignable/1.cc     | 3 +--
 .../std/concepts/concepts.lang/concept.common/1.cc         | 3 +--
 .../std/concepts/concepts.lang/concept.commonref/1.cc      | 3 +--
 .../std/concepts/concepts.lang/concept.constructible/1.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.convertible/1.cc    | 3 +--
 .../concepts/concepts.lang/concept.copyconstructible/1.cc  | 3 +--
 .../concepts.lang/concept.defaultinitializable/1.cc        | 3 +--
 .../concepts.lang/concept.defaultinitializable/lwg3149.cc  | 3 +--
 .../std/concepts/concepts.lang/concept.derived/1.cc        | 3 +--
 .../std/concepts/concepts.lang/concept.destructible/1.cc   | 3 +--
 .../concepts/concepts.lang/concept.moveconstructible/1.cc  | 3 +--
 .../testsuite/std/concepts/concepts.lang/concept.same/1.cc | 3 +--
 .../std/concepts/concepts.lang/concept.swappable/swap.cc   | 3 +--
 .../concepts/concepts.lang/concept.swappable/swappable.cc  | 3 +--
 .../concepts.lang/concept.swappable/swappable_with.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/copyable.cc     | 3 +--
 .../testsuite/std/concepts/concepts.object/movable.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/regular.cc      | 3 +--
 .../testsuite/std/concepts/concepts.object/semiregular.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/97600.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/101782.cc         | 2 +-
 libstdc++-v3/testsuite/std/ranges/access/begin.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cbegin.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cdata.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/cend.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/crbegin.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/crend.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/data.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/empty.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/end.cc            | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/end_neg.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/p2602.cc          | 1 -
 libstdc++-v3/testsuite/std/ranges/access/rbegin.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/rend.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/size.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/size_neg.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/access/ssize.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/all.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/common.cc       | 3 +--
 .../std/ranges/adaptors/conditionally_borrowed.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc      | 3 +--
 .../testsuite/std/ranges/adaptors/detail/copyable_box.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc     | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/join.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc   | 3 +--
 .../testsuite/std/ranges/adaptors/lazy_split_neg.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc        | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc      | 1 -
 libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/split.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/take.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc    | 3 +--
 libstdc++-v3/testsuite/std/ranges/empty_view.cc            | 3 +--
 .../testsuite/std/ranges/headers/ranges/synopsis.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc  | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/iterator.cc         | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc    | 3 +--
 libstdc++-v3/testsuite/std/ranges/istream_view.cc          | 3 +--
 libstdc++-v3/testsuite/std/ranges/p2259.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/p2325.cc                 | 1 -
 libstdc++-v3/testsuite/std/ranges/p2367.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/range.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/refinements.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/safe_range.cc            | 3 +--
 libstdc++-v3/testsuite/std/ranges/safe_range_types.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/single_view.cc           | 3 +--
 libstdc++-v3/testsuite/std/ranges/sized.cc                 | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/1.cc            | 1 -
 libstdc++-v3/testsuite/std/ranges/subrange/97512.cc        | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc    | 1 -
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc  | 7 +++----
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc      | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc       | 3 +--
 libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc   | 3 +--
 libstdc++-v3/testsuite/std/ranges/view.cc                  | 3 +--
 105 files changed, 101 insertions(+), 205 deletions(-)

diff --git a/libstdc++-v3/testsuite/std/concepts/1.cc b/libstdc++-v3/testsuite/std/concepts/1.cc
index add7b0e83b4..0301b91e869 100644
--- a/libstdc++-v3/testsuite/std/concepts/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do preprocess { target c++2a } }
+// { dg-do preprocess { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/2.cc b/libstdc++-v3/testsuite/std/concepts/2.cc
index 0098a2e2f85..53a1e006993 100644
--- a/libstdc++-v3/testsuite/std/concepts/2.cc
+++ b/libstdc++-v3/testsuite/std/concepts/2.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do preprocess { target c++2a } }
+// { dg-do preprocess { target c++20 } }
 
 #include <version>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
index bb9849b196f..9a19854746f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/invocable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
index a18fbfc3c1a..98f58f9864b 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/regular_invocable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
index 75cbbdf96db..6c3e182f19c 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/relation.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc b/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
index b43d485161c..36861759984 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.callable/strictweakorder.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
index 15f892b76f6..96d9588f2b8 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
index b9cc5cd251e..53ea3e39433 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
index 6e18e916547..906a2bf7433 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
index 8578dc0b463..37e80fcd068 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
index b0aca56d944..fd45713558f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.assignable/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
index 4d6254c3d2c..6b7c32948c4 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.common/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
index 118ee8c4b58..f56e0b04878 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.commonref/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
index b66c286d67a..d6c985ea81f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.constructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
index cc2bc945458..eaa624e9c1d 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.convertible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
index 9f6f3f77023..7d4a66fcf26 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
index 4a479742c1a..be020a9c97a 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
index 7f49a2a9647..53b3d1fd81a 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
index f877d53eb13..8624b3559f0 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.derived/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
index 29ab5146544..2f915bc9ef2 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.destructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
index 26debdf0ab1..a540f91978e 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
index 7dbaa08281a..3537ed2beff 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.same/1.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
index 2bc7a434e0f..050270762e1 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
index d0487e04998..76e23e23e0e 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
index 90db5a91b54..5a956dc2d6c 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
index 3fab3d8e372..cece9109640 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/copyable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
index e087a66a96c..16f39277627 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/movable.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
index 3dcc66a3c2f..485dc42b2f4 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/regular.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc b/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
index 633a9f1fe8c..0d1c9f78f1b 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.object/semiregular.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <concepts>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/97600.cc b/libstdc++-v3/testsuite/std/ranges/97600.cc
index 7da0542b19e..569a4ef8e2e 100644
--- a/libstdc++-v3/testsuite/std/ranges/97600.cc
+++ b/libstdc++-v3/testsuite/std/ranges/97600.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/97600
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/101782.cc b/libstdc++-v3/testsuite/std/ranges/access/101782.cc
index abb0c8dab0f..25fea793355 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/101782.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/101782.cc
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++20 -fconcepts-ts" }
+// { dg-options "-fconcepts-ts" }
 // { dg-do compile { target c++20 } }
 
 // PR testsuite/101782
diff --git a/libstdc++-v3/testsuite/std/ranges/access/begin.cc b/libstdc++-v3/testsuite/std/ranges/access/begin.cc
index 0bc09992666..ac813df32f1 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/begin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/begin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
index 0be7358e9a3..023ea0e9aef 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/begin_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
index 3667b0d021f..0b53a6e6ff3 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cdata.cc b/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
index d69b04c8f74..69c9112d2ce 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cdata.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/cend.cc b/libstdc++-v3/testsuite/std/ranges/access/cend.cc
index 3726ebbf118..aa304fe4564 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/cend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/cend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
index 95b4607fdf1..04217164199 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/crend.cc b/libstdc++-v3/testsuite/std/ranges/access/crend.cc
index 2e4c0f3197a..5ef218bbbfa 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/crend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/crend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/data.cc b/libstdc++-v3/testsuite/std/ranges/access/data.cc
index 366db744440..1e3d6f20e89 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/data.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/data.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/empty.cc b/libstdc++-v3/testsuite/std/ranges/access/empty.cc
index 51898ec0c8f..a0b474c0bbe 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/empty.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/empty.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/end.cc b/libstdc++-v3/testsuite/std/ranges/access/end.cc
index 6c96b313dbb..f795e703439 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/end.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/end.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
index 6e19cbd59a7..7daeec0a9bc 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/end_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc b/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
index e5b3be093cb..6fed9029279 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/lwg3467.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // LWG 3467. bool can't be an integer-like type
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/p2602.cc b/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
index 9c6a0e6ee95..8c403c1c3b6 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/p2602.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 // P2602R2 Poison Pills are Too Toxic
diff --git a/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc b/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
index b7314b824ed..ad9deebedd0 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/rend.cc b/libstdc++-v3/testsuite/std/ranges/access/rend.cc
index d3d90418411..3e25c9037e0 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/rend.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/rend.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/size.cc b/libstdc++-v3/testsuite/std/ranges/access/size.cc
index e52e2968eb3..a5795a6b9dd 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/size.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/size.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc b/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
index 2cb85636fa1..446d833d6d1 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/size_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/access/ssize.cc b/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
index abc6997eebb..47021350dd6 100644
--- a/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
+++ b/libstdc++-v3/testsuite/std/ranges/access/ssize.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
index a8cb5036c60..8f5814c21b1 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 // PR libstdc++/100479
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
index 59f8819c201..29fa07359c1 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/100577
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
index 256ee7f6774..9690a376408 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc
@@ -15,9 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
 // { dg-additional-options "-O -Wall" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <vector>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
index 792bbfff922..f5832768cdd 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++20" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
index c9fcc11e06e..bb86806ca01 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/99433.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/99433
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
index 6bbaf73a20a..dadd08122ba 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
index 2e179c33592..8404317bf2c 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/common.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
index 0f813d34481..77b802a105f 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/conditionally_borrowed.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
index d99e9628507..89fea4643d5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/counted.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
index 209ce3ec3ee..dbc1fd23412 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/detail/copyable_box.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
index 2c4047dbaa3..4f4030c46a5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/drop.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
index 5022e52b346..0d3a88da118 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/drop_while.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
index 1b49282a206..05ccec49b01 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/elements.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
index 2ad365327ea..9a9b2ac34d9 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
index 7401d69b30d..377b771eb3e 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <array>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
index 4e5c0dc3ed5..5895b7e851a 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
index 6c6fe1703f5..cd569bbf972 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <algorithm>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
index e30945fbf18..1c1c590b866 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3286.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
index 2fe119efbe3..d0a07c7bdb7 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3313_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <array>
 #include <iterator>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
index 24e7e5cff9b..60960a57267 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3325_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
index 68d41b49d4a..7e87fb6fa31 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lwg3406.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
index a1e66738789..d9188ba8866 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p1739.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 // { dg-require-effective-target hosted }
 
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
index 2025ddb1459..3785c88a5b5 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
index 15d71b2faa9..e754da4562b 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p2770r0.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
index b07883eeaa9..647f4ccd5b6 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/reverse.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
index f420afc46a0..2efb53fd785 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <string_view>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
index d49d594d570..1d96269ac96 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
index a1f6068bc09..91c62619774 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/take.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <forward_list>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
index 098091edc8b..7476b8f6997 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/take_while.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <forward_list>
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
index d9801d5abb3..b6d49810bc7 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/empty_view.cc b/libstdc++-v3/testsuite/std/ranges/empty_view.cc
index ea5a106d106..21ea3058c8c 100644
--- a/libstdc++-v3/testsuite/std/ranges/empty_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/empty_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
index 67af2f867c9..dfa3fcaa37e 100644
--- a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
+++ b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc b/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
index 0af3cdc56e8..9375492832b 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/difference_type.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc b/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
index 0d2eaf1d0c2..134e20f3062 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/iota_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc b/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
index 4b2ac3af47a..7ae5b2edebe 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/iterator.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc b/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
index f15d8aa3229..ea7721f5c43 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/lwg3292_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 
 #include <sstream>
diff --git a/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc b/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
index 54c26ba2b4b..a1fbc3241dc 100644
--- a/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
+++ b/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 // { dg-timeout-factor 4 }
 
 #include <limits>
diff --git a/libstdc++-v3/testsuite/std/ranges/istream_view.cc b/libstdc++-v3/testsuite/std/ranges/istream_view.cc
index cc1c3e006b9..14ec85a4048 100644
--- a/libstdc++-v3/testsuite/std/ranges/istream_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/istream_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/p2259.cc b/libstdc++-v3/testsuite/std/ranges/p2259.cc
index 0e816bd7157..fb0de984a1a 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2259.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2259.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Verify P2259 changes.
 
diff --git a/libstdc++-v3/testsuite/std/ranges/p2325.cc b/libstdc++-v3/testsuite/std/ranges/p2325.cc
index accd2655b95..23d63070d97 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2325.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2325.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 // { dg-require-effective-target hosted }
 // P2325R3 "Views should not be required to be default constructible"
diff --git a/libstdc++-v3/testsuite/std/ranges/p2367.cc b/libstdc++-v3/testsuite/std/ranges/p2367.cc
index 13bd2c9bc53..9a034a313dd 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2367.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2367.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // Verify P2367 changes.
 
diff --git a/libstdc++-v3/testsuite/std/ranges/range.cc b/libstdc++-v3/testsuite/std/ranges/range.cc
index f721ec38718..728fd66b2d2 100644
--- a/libstdc++-v3/testsuite/std/ranges/range.cc
+++ b/libstdc++-v3/testsuite/std/ranges/range.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/refinements.cc b/libstdc++-v3/testsuite/std/ranges/refinements.cc
index 582bf62e805..27351d0adc7 100644
--- a/libstdc++-v3/testsuite/std/ranges/refinements.cc
+++ b/libstdc++-v3/testsuite/std/ranges/refinements.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/safe_range.cc b/libstdc++-v3/testsuite/std/ranges/safe_range.cc
index bdebfe8e235..fc3bdd0b630 100644
--- a/libstdc++-v3/testsuite/std/ranges/safe_range.cc
+++ b/libstdc++-v3/testsuite/std/ranges/safe_range.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc b/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
index fc43871f847..c123afc5681 100644
--- a/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
+++ b/libstdc++-v3/testsuite/std/ranges/safe_range_types.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <span>
diff --git a/libstdc++-v3/testsuite/std/ranges/single_view.cc b/libstdc++-v3/testsuite/std/ranges/single_view.cc
index 8dfe6bb4bd1..336e3bcb215 100644
--- a/libstdc++-v3/testsuite/std/ranges/single_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/single_view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <utility> // as_const
diff --git a/libstdc++-v3/testsuite/std/ranges/sized.cc b/libstdc++-v3/testsuite/std/ranges/sized.cc
index 17bbd082e22..9a9ef9cd4e4 100644
--- a/libstdc++-v3/testsuite/std/ranges/sized.cc
+++ b/libstdc++-v3/testsuite/std/ranges/sized.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/1.cc b/libstdc++-v3/testsuite/std/ranges/subrange/1.cc
index 8a53261c78c..4a29c79e046 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/1.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc b/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
index c4b1ef7ed99..184feabbde8 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/97512.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 // PR libstdc++/97512
 // Check that structured bindings work for subranges without <ranges>.
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc b/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc
index f5bc52bef84..295042f5e3d 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc
@@ -1,4 +1,3 @@
-// { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
 
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
index dafaf25a6f9..c7d93a45f26 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3282_neg.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
@@ -36,9 +35,9 @@ test_lwg3404()
   // LWG 3404. Finish removing subrange's conversions from pair-like
   std::pair<char*, char*> p;
   subrange sb1(p);			// { dg-error "no matching function" }
-  // { dg-error "class template argument deduction" "" { target *-*-* } 38 }
+  // { dg-error "class template argument deduction" "" { target *-*-* } 37 }
   subrange sb2(p, p.second - p.first);	// { dg-error "no matching function" }
-  // { dg-error "class template argument deduction" "" { target *-*-* } 40 }
+  // { dg-error "class template argument deduction" "" { target *-*-* } 39 }
 
   // { dg-prune-output "in requirements with" }
 }
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
index c46523ca768..f4dc233fbee 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3286.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <ranges>
 #include <testsuite_iterators.h>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
index 559c5bca236..c7a33c83cdf 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/lwg3433.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do run { target c++2a } }
+// { dg-do run { target c++20 } }
 
 #include <algorithm>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc b/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
index 1e7c7c10e49..7d3a4eb0c32 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/sizeof.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <iterator>
 #include <ranges>
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc b/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
index c3450fe9020..742fdc45c2e 100644
--- a/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/tuple_like.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 
diff --git a/libstdc++-v3/testsuite/std/ranges/view.cc b/libstdc++-v3/testsuite/std/ranges/view.cc
index 94e285b30ee..bfc52ffcd82 100644
--- a/libstdc++-v3/testsuite/std/ranges/view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/view.cc
@@ -15,8 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
 
 #include <ranges>
 #include <span>
-- 
2.41.0


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

* Re: [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options
  2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
                   ` (13 preceding siblings ...)
  2023-09-12 13:05 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
@ 2023-09-15 23:04 ` Jonathan Wakely
  14 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2023-09-15 23:04 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On Mon, 11 Sept 2023 at 17:37, Jonathan Wakely via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> This patch series replicates the behaviour of the g++ testsuite, so that
> libstdc++ tests can easily be run for multiple different -std options in
> a single testsuite run.  As described in the updated docs, the -std
> options to use for every test can be overridden by setting v3_std_list
> in ~/.dejagnurc or $DEJAGNU, or setting $GLIBCXX_TESTSUITE_STDS in the
> environment.  If not overridden, the default is just to run with
> -std=gnu++17 (so that we don't increase the time taken for a full
> testsuite run).
>
> Tests that require a newer standard than C++17 will default to that
> newer standard and C++26, so e.g. std::format tests will be run with
> both -std=gnu++20 and -std=gnu++26.  This does increase the number of
> tests, but only for the subset of tests for C++20/23/26 features.  If
> this is too costly for testers, we can change that (this might be
> needed, because the C++20 tests for std::ranges and std::format are
> particularly slow to compile).
>
> Because a correct default will be chosen for tests that require
> something newer than C++17, we no longer need dg-options "-std=gnu++20"
> or similar in any tests.  Removing the explicit -std option allows the
> test to be run for later standards via the v3_std_list settings, so that
> we can verify that C++20 features still work in C++23 and C++26, for
> example.  This change already found some tests which failed when run
> with a later standard (see r14-3771-gf12e26f3496275).
>
> Patches 2-13 in the series remove those unnecessary dg-options from
> about half the relevant tests, but there are more than 500 others that
> still need adjusting.
>
> We can remove files like testsuite/std/format/functions/format_c++23.cc
> which only exist to duplicate existing tests with a different -std
> option.  We can remove that file now, and rely on format.cc being run
> with multiple -std options by libstdc++ maintainers.
>
> It might also be useful to add a 'make check-quick' target which runs a
> small subset of smoke tests with every standard version in v3_std_list.
> This would be a suitable target for CI bots and for packagers who want
> to verify that a build of GCC is functional, without running the entire
> libstdc++ testsuite.

This has been pushed to trunk now.


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

end of thread, other threads:[~2023-09-15 23:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 16:16 [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
2023-09-11 16:16 ` [PATCH 01/13] " Jonathan Wakely
2023-09-11 16:16 ` [PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std Jonathan Wakely
2023-09-11 16:16 ` [PATCH 03/13] libstdc++: Replace dg-options "-std=c++17" " Jonathan Wakely
2023-09-11 16:16 ` [PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" " Jonathan Wakely
2023-09-11 16:16 ` [PATCH 05/13] libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests Jonathan Wakely
2023-09-15 20:54   ` [PATCH v2 6/13] " Jonathan Wakely
2023-09-11 16:16 ` [PATCH 07/13] libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 08/13] libstdc++: Remove dg-options "-std=gnu++20" from std::format tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 09/13] libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 10/13] libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 11/13] libstdc++: Remove dg-options "-std=gnu++23" from remaining tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 12/13] libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests Jonathan Wakely
2023-09-11 16:16 ` [PATCH 13/13] libstdc++: Simplify dejagnu directives for some tests using threads Jonathan Wakely
2023-09-12 13:05 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely
2023-09-12 13:39   ` [PATCH 14/13] libstdc++: Re-initialize static data files used by tests Jonathan Wakely
2023-09-15 23:04 ` [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).