Commit graph

14593 commits

Author SHA1 Message Date
Tom Tromey
bed1f8498a libstdc++: Remove unused Python imports
flake8 pointed out some unused imports.

libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py: Don't import 'os'.
	* python/libstdcxx/v6/__init__.py: Don't import 'gdb'.
2023-09-28 14:55:54 -06:00
Tom Tromey
64f1210301 libstdc++: Use gdb.ValuePrinter base class
GDB 14 will add a new ValuePrinter tag class that will be used to
signal that pretty-printers will agree to the "extension protocol" --
essentially that they will follow some simple namespace rules, so that
GDB can add new methods over time.

A couple new methods have already been added to GDB, to support DAP.
While I haven't implemented these for any libstdc++ printers yet, this
patch makes the basic conversion: printers derive from
gdb.ValuePrinter if it is available, and all "non-standard" (that is,
not specified by GDB) members of the various value-printing classes
are renamed to have a leading underscore.

libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py: Use gdb.ValuePrinter
	everywhere.  Rename members to start with "_".
2023-09-28 14:55:23 -06:00
Tom Tromey
98db58eb0b libstdc++: Show full Python stack on error
This changes the libstdc++ test suite to arrange for gdb to show the
full Python stack if any sort of Python exception occurs.  This makes
debugging the printers a little simpler.

libstdc++-v3/ChangeLog:

	* testsuite/lib/gdb-test.exp (gdb-test): Enable Python
	stack traces from gdb.
2023-09-28 14:55:18 -06:00
Jonathan Wakely
17d3477fa8 libstdc++: Refactor Python Xmethods to use is_specialization_of
This copies the is_specialization_of function from printers.py (with
slight modification for versioned namespace handling) and reuses it in
xmethods.py to replace repetitive re.match calls in every class.

This fixes the problem that the regular expressions used \d without
escaping the backslash properly.

libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/xmethods.py (is_specialization_of): Define
	new function.
	(ArrayMethodsMatcher, DequeMethodsMatcher)
	(ForwardListMethodsMatcher, ListMethodsMatcher)
	(VectorMethodsMatcher, AssociativeContainerMethodsMatcher)
	(UniquePtrGetWorker, UniquePtrMethodsMatcher)
	(SharedPtrSubscriptWorker, SharedPtrMethodsMatcher): Use
	is_specialization_of instead of re.match.
2023-09-28 21:20:27 +01:00
Jonathan Wakely
6b5c3f9b81 libstdc++: Reformat Python code
Some of these changes were suggested by autopep8's --aggressive
option, others are for readability.

Break long lines by splitting strings across multiple lines, or
introducing local variables to hold results.

Use raw strings for regular expressions, so that backslashes don't need
to be escaped.

libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py: Break long lines. Use raw
	strings for regular expressions. Add whitespace around
	operators.
	(is_member_of_namespace): Use isinstance to check type.
	(is_specialization_of): Likewise. Adjust template_name
	for versioned namespace instead of duplicating the re.match
	call.
	(StdExpAnyPrinter._string_types): New static method.
	(StdExpAnyPrinter.to_string): Use _string_types.
2023-09-28 21:20:21 +01:00
Jonathan Wakely
0ef4cc8225 libstdc++: Format Python docstrings according to PEP 357
libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py: Format docstrings according
	to PEP 257.
	* python/libstdcxx/v6/xmethods.py: Likewise.
2023-09-28 20:56:44 +01:00
Tim Song
2c1e3544a9 libstdc++: Force _Hash_node_value_base methods inline to fix abi (PR111050)
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d
changed _Hash_node_value_base to no longer derive from _Hash_node_base, which means
that its member functions expect _M_storage to be at a different offset. So explosions
result if an out-of-line definition is emitted for any of the member functions (say,
in a non-optimized build) and the resulting object file is then linked with code built
using older version of GCC/libstdc++.

libstdc++-v3/ChangeLog:

	PR libstdc++/111050
	* include/bits/hashtable_policy.h
	(_Hash_node_value_base<>::_M_valptr(), _Hash_node_value_base<>::_M_v())
	Add [[__gnu__::__always_inline__]].
2023-09-28 19:14:30 +02:00
GCC Administrator
0d9b4e8647 Daily bump. 2023-09-28 09:50:12 +00:00
Jonathan Wakely
1fab05a885 libstdc++: Fix format string in StdChronoTimeZoneRulePrinter
libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py (StdChronoTimeZoneRulePrinter):
	Fix incorrect number of replacement fields.
2023-09-27 17:09:52 +01:00
Hans-Peter Nilsson
dd0c42cd37 testsuite: Require thread-fence for 29_atomics/atomic_flag/cons/value_init.cc
A recent patch made __atomic_test_and_set no longer fall
back to emitting non-atomic code, but instead will then emit
a call to __atomic_test_and_set, thereby exposing the need
to gate also this test on support for atomics, similar to
r14-3980-g62b29347c38394.

libstdc++-v3:
	* testsuite/29_atomics/atomic_flag/cons/value_init.cc: Add
	dg-require-thread-fence.
2023-09-26 23:39:17 +02:00
GCC Administrator
a435e4ab2e Daily bump. 2023-09-26 00:17:58 +00:00
Patrick Palka
bf3c19903a libstdc++: Shorten integer std::to/from_chars symbol names
For std::to_chars:

The constrained alias __integer_to_chars_result_type seems unnecessary
ever since r10-3080-g28f0075742ed58 got rid of the only public overload
which used it.  Now only non-public overloads are constrained by it
(through their return type) and these non-public overloads aren't used
in a SFINAE context, so the constraints have no observable effect.  So
this patch gets rid of this alias, which greatly shortens the symbol names
of the affected functions (since the expanded alias is quite large).

For std::from_chars:

We can't get rid of the corresponding alias because its constrains the
public integer std::from_chars overload.  But we can avoid having the
constraint bloat the mangled name by instead encoding it as a defaulted
template parameter.  We use the non-type parameter form

  enable_if_t<..., int> = 0

instead of the type parameter form

  typename = enable_if_t<...>

because the type form can be bypassed by giving an explicit template
argument for the type parameter, e.g. 'std::from_chars<int, void>(...)',
so the non-type form seems like the more robust choice.

In passing, use __is_standard_integer in the constraint.

libstdc++-v3/ChangeLog:

	* include/std/charconv (__detail::__integer_to_chars_result_type):
	Remove.
	(__detail::__to_chars_16): Use to_chars_result as return type.
	(__detail::__to_chars_10): Likewise.
	(__detail::__to_chars_8): Likewise.
	(__detail::__to_chars_2): Likewise.
	(__detail::__to_chars_i): Likewise.
	(__detail::__integer_from_chars_result_type): Inline the
	constraint into ...
	(from_chars): ... here.  Use __is_standard_integer in the
	constraint.  Encode constraint as a defaulted non-type template
	parameter instead of within the return type.
2023-09-25 14:48:26 -04:00
John David Anglin
c92d330c63 Update baseline symbols for hppa-linux.
2023-09-25  John David Anglin  <danglin@gcc.gnu.org>

libstdc++-v3/ChangeLog:

	* config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
2023-09-25 15:16:49 +00:00
Jonathan Wakely
77cf377302 libstdc++: Prevent unwanted ADL in std::to_array [PR111512]
As noted in PR c++/111512, GCC does ADL for __builtin_memcpy if it is
unqualified, which can cause errors for template argument types which
cannot be completed.

Casting the memcpy arguments to void* prevents ADL from considering the
problem type.

libstdc++-v3/ChangeLog:

	PR libstdc++/111511
	PR c++/111512
	* include/std/array (to_array): Cast memcpy arguments to void*.
	* testsuite/23_containers/array/creation/111512.cc: New test.
2023-09-25 09:48:44 +01:00
Jonathan Wakely
55cf4f8437 libstdc++: Define C++23 std::forward_like (P2445R1)
libstdc++-v3/ChangeLog:

	* include/bits/move.h (forward_list): Define for C++23.
	* include/bits/version.def (forward_like): Define.
	* include/bits/version.h: Regenerate.
	* include/std/utility (__glibcxx_want_forward_like): Define.
	* testsuite/20_util/forward_like/1.cc: New test.
	* testsuite/20_util/forward_like/2_neg.cc: New test.
	* testsuite/20_util/forward_like/version.cc: New test.
2023-09-25 09:48:44 +01:00
GCC Administrator
590a8bec3e Daily bump. 2023-09-20 00:17:55 +00:00
Marek Polacek
6851e3423c c++: Move consteval folding to cp_fold_r
In the review of P2564:
<https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628747.html>
it turned out that in order to correctly handle an example in the paper,
we should stop doing immediate evaluation in build_over_call and
bot_replace, and instead do it in cp_fold_r.  This patch does that.

Another benefit is that this is a pretty significant simplification, at
least in my opinion.  Also, this fixes the c++/110997 ICE (but the test
doesn't compile yet).

The main drawback seems to be that cp_fold_r doesn't process
uninstantiated templates.  We still have to handle things like
"false ? foo () : 1".  To that end, I've added cp_fold_immediate, called
on dead branches in cxx_eval_conditional_expression.

You'll see that I've reintroduced ADDR_EXPR_DENOTES_CALL_P here.  This
is to detect

  *(&foo)) ()
  (s.*&S::foo) ()

which were deemed ill-formed.

gcc/cp/ChangeLog:

	* call.cc (build_over_call): Set ADDR_EXPR_DENOTES_CALL_P.  Don't handle
	immediate_invocation_p here.
	* constexpr.cc (cxx_eval_call_expression): Use mce_true for
	DECL_IMMEDIATE_FUNCTION_P.
	(cxx_eval_conditional_expression): Call cp_fold_immediate.
	* cp-gimplify.cc (enum fold_flags): Add ff_fold_immediate.
	(maybe_replace_decl): Make static.
	(cp_fold_r): Expand immediate invocations.
	(cp_fold_immediate_r): New.
	(cp_fold_immediate): New.
	* cp-tree.h (ADDR_EXPR_DENOTES_CALL_P): Define.
	(cp_fold_immediate): Declare.
	* tree.cc (bot_replace): Don't handle immediate invocations here.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/allocator/105975.cc: Add dg-error.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp23/consteval-if2.C: Add xfail.
	* g++.dg/cpp2a/consteval-memfn1.C: Adjust.
	* g++.dg/cpp2a/consteval11.C: Remove dg-message.
	* g++.dg/cpp2a/consteval3.C: Remove dg-message and dg-error.
	* g++.dg/cpp2a/consteval9.C: Remove dg-message.
	* g++.dg/cpp2a/consteval32.C: New test.
	* g++.dg/cpp2a/consteval33.C: New test.
	* g++.dg/cpp2a/consteval34.C: New test.
	* g++.dg/cpp2a/consteval35.C: New test.
2023-09-19 09:24:44 -04:00
GCC Administrator
6b78e9a59b Daily bump. 2023-09-19 00:17:49 +00:00
Patrick Palka
6e92a6a2a7 c++: non-dependent assignment checking [PR63198, PR18474]
This patch makes us recognize and check non-dependent simple assigments
ahead of time, like we already do for compound assignments.  This means
the templated representation of such assignments will now usually have
an implicit INDIRECT_REF (due to the reference return type), which the
-Wparentheses code needs to handle.  As a drive-by improvement, this
patch also makes maybe_convert_cond issue -Wparentheses warnings ahead
of time, and removes a seemingly unnecessary suppress_warning call in
build_x_modify_expr.

On the libstdc++ side, some tests were attempting to modify a data
member from a uninstantiated const member function, which this patch
minimally fixes by making the data member mutable.

	PR c++/63198
	PR c++/18474

gcc/cp/ChangeLog:

	* semantics.cc (maybe_convert_cond): Look through implicit
	INDIRECT_REF when deciding whether to issue a -Wparentheses
	warning, and consider templated assignment expressions as well.
	(finish_parenthesized_expr): Look through implicit INDIRECT_REF
	when suppressing -Wparentheses warning.
	* typeck.cc (build_x_modify_expr): Check simple assignments
	ahead time too, not just compound assignments.  Give the second
	operand of MODOP_EXPR a non-null type so that it's not considered
	always instantiation-dependent.  Don't call suppress_warning.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/static_assert15.C: Expect diagnostic for
	non-constant static_assert condition.
	* g++.dg/expr/unary2.C: Remove xfails.
	* g++.dg/template/init7.C: Make initializer type-dependent to
	preserve intent of test.
	* g++.dg/template/recurse3.C: Likewise for the erroneous
	statement.
	* g++.dg/template/non-dependent26.C: New test.
	* g++.dg/warn/Wparentheses-32.C: New test.

libstdc++-v3/ChangeLog:

	* testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
	Make data member seed_seq::called mutable.
	* testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq2.cc:
	Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/cons/seed_seq2.cc:
	Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/cons/seed_seq2.cc:
	Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
	Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/cons/seed_seq2.cc:
	Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/seed_seq2.cc:
	Likewise.
2023-09-18 14:47:52 -04:00
Jonathan Wakely
00d16a269a libstdc++: Minor tweak to C++20 status docs
The row for P1466R3 was missing the info on when it was implemented.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Tweak P1466R3 status.
	* doc/html/manual/status.html: Regenerate.
2023-09-18 15:21:22 +01:00
Jonathan Wakely
c8e9a75085 libstdc++: Update C++20 and C++23 status docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/configure.xml: Use conventional option name.
	* doc/xml/manual/status_cxx2020.xml: Update.
	* doc/xml/manual/status_cxx2023.xml: Update.
	* doc/html/*: Regenerate.
2023-09-18 14:09:53 +01:00
Jonathan Wakely
12755fe40b libstdc++: Minor update to installation docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Clarify that building libstdc++
	separately from GCC is not supported.
	* doc/xml/manual/prerequisites.xml: Note msgfmt prerequisite for
	testing.
	* doc/html/manual/setup.html: Regenerate.
2023-09-18 12:15:34 +01:00
GCC Administrator
37bbfd1c55 Daily bump. 2023-09-16 00:17:55 +00:00
Jonathan Wakely
0ff31212eb libstdc++: Do not require effective target pthread for some tests
We can remove { dg-require-effective-target pthread } and allow these
tests non-pthread targets and conditionally adding -pthread only for
pthread targets.

Also remove the { dg-options "-std=gnu++20" } that is no longer needed.

libstdc++-v3/ChangeLog:

	* testsuite/29_atomics/atomic_ref/wait_notify.cc: Do not
	restrict to pthreads targets.
	* testsuite/30_threads/jthread/3.cc: Likewise.
	* testsuite/30_threads/semaphore/100806.cc: Likewise.
	* testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
	* testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
	* testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise.
2023-09-16 00:10:46 +01:00
Jonathan Wakely
8ccae1639f libstdc++: Remove dg-options "-std=gnu++20" from remaining tests
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/18_support/coroutines/95917.cc: Remove dg-options
	-std=gnu++2a.
	* testsuite/18_support/coroutines/hash.cc: Likewise.
	* testsuite/18_support/coroutines/lwg3460.cc: Likewise.
	* testsuite/18_support/destroying_delete.cc: Likewise.
	* testsuite/18_support/source_location/1.cc: Likewise.
	* testsuite/18_support/source_location/consteval.cc: Likewise.
	* testsuite/18_support/source_location/version.cc: Likewise.
	* testsuite/19_diagnostics/error_category/operators/three_way.cc:
	Likewise.
	* testsuite/19_diagnostics/error_code/operators/three_way.cc:
	Likewise.
	* testsuite/19_diagnostics/error_condition/operators/three_way.cc:
	Likewise.
	* testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
	* testsuite/26_numerics/adjacent_difference/lwg2055.cc:
	Likewise.
	* testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
	* testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
	* testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
	* testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
	Likewise.
	* testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
	Likewise.
	* testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
	Likewise.
	* testsuite/28_regex/sub_match/compare_c++20.cc: Likewise.
	* testsuite/experimental/filesystem/iterators/106201.cc:
	Likewise.
	* testsuite/experimental/scopeguard/exit.cc: Likewise.
	* testsuite/experimental/scopeguard/uniqueres.cc: Likewise.
2023-09-16 00:10:46 +01:00
Jonathan Wakely
4be56e298f libstdc++: Remove dg-options "-std=gnu++20" from 30_threads tests
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/30_threads/barrier/1.cc: Remove dg-options
	-std=gnu++20.
	* testsuite/30_threads/barrier/2.cc: Likewise.
	* testsuite/30_threads/barrier/arrive.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
	* testsuite/30_threads/barrier/completion.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/stop_token/1.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/stop_token/2.cc:
	Likewise.
	* testsuite/30_threads/future/members/clock_neg.cc: Likewise.
	* testsuite/30_threads/headers/stop_token/synopsis.cc: Likewise.
	* testsuite/30_threads/headers/thread/types_std_c++20.cc:
	Likewise.
	* testsuite/30_threads/jthread/1.cc: Likewise.
	* testsuite/30_threads/jthread/100612.cc: Likewise.
	* testsuite/30_threads/jthread/95989.cc: Likewise.
	* testsuite/30_threads/jthread/jthread.cc: Likewise.
	* testsuite/30_threads/jthread/version.cc: Likewise.
	* testsuite/30_threads/latch/1.cc: Likewise.
	* testsuite/30_threads/latch/2.cc: Likewise.
	* testsuite/30_threads/latch/3.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/semaphore/1.cc: Likewise.
	* testsuite/30_threads/semaphore/2.cc: Likewise.
	* testsuite/30_threads/semaphore/least_max_value_neg.cc:
	Likewise.
	* testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
	* testsuite/30_threads/shared_future/members/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/shared_lock/locking/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/stop_token/1.cc: Likewise.
	* testsuite/30_threads/stop_token/2.cc: Likewise.
	* testsuite/30_threads/stop_token/stop_callback.cc: Likewise.
	* testsuite/30_threads/stop_token/stop_callback/deadlock.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_callback/invoke.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_source.cc: Likewise.
	* testsuite/30_threads/stop_token/stop_source/assign.cc:
	Likewise.
	* testsuite/30_threads/stop_token/stop_token.cc: Likewise.
	* testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
	Likewise.
	* testsuite/30_threads/thread/id/operators_c++20.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc:
	Likewise.
	* testsuite/30_threads/unique_lock/locking/clock_neg.cc:
	Likewise.
2023-09-16 00:10:46 +01:00
Jonathan Wakely
f1b06f571d libstdc++: Remove dg-options "-std=gnu++20" from 27_io tests
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/27_io/basic_istream/extractors_character/char/lwg2499.cc:
	Remove dg-options -std=gnu++2a.
	* testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
	Likewise.
	* testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
	* testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_istringstream/str/char/2.cc: Likewise.
	* testsuite/27_io/basic_istringstream/str/wchar_t/2.cc:
	Likewise.
	* testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
	* testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc:
	Likewise.
	* testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostringstream/str/char/3.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc:
	Likewise.
	* testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/str/char/4.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringstream/cons/char/97719.cc:
	Likewise.
	* testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_stringstream/str/char/5.cc: Likewise.
	* testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc:
	Likewise.
	* testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/basic_syncbuf/1.cc: Likewise.
	* testsuite/27_io/basic_syncbuf/2.cc: Likewise.
	* testsuite/27_io/basic_syncbuf/basic_ops/1.cc: Likewise.
	* testsuite/27_io/basic_syncbuf/requirements/types.cc: Likewise.
	* testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Likewise.
	* testsuite/27_io/basic_syncstream/1.cc: Likewise.
	* testsuite/27_io/basic_syncstream/2.cc: Likewise.
	* testsuite/27_io/basic_syncstream/basic_ops/1.cc: Likewise.
	* testsuite/27_io/basic_syncstream/requirements/types.cc:
	Likewise.
	* testsuite/27_io/filesystem/iterators/106201.cc: Likewise.
	* testsuite/27_io/filesystem/iterators/lwg3719.cc: Likewise.
	* testsuite/27_io/filesystem/path/factory/u8path-depr.cc:
	Likewise.
	* testsuite/27_io/filesystem/path/nonmember/cmp_c++20.cc:
	Likewise.
2023-09-16 00:10:46 +01:00
Jonathan Wakely
bb2dd7619f libstdc++: Remove dg-options "-std=gnu++20" from 26_numerics tests
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/26_numerics/accumulate/constexpr.cc: Remove
	dg-options -std=gnu++2a.
	* testsuite/26_numerics/accumulate/lwg2055.cc: Likewise.
	* testsuite/26_numerics/adjacent_difference/constexpr.cc:
	Likewise.
	* testsuite/26_numerics/bit/bit.cast/105027.cc: Likewise.
	* testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Likewise.
	* testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
	* testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc:
	Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/lwg3656.cc: Likewise.
	* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
	* testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
	* testsuite/26_numerics/bit/header-2.cc: Likewise.
	* testsuite/26_numerics/bit/header.cc: Likewise.
	* testsuite/26_numerics/complex/1.cc: Likewise.
	* testsuite/26_numerics/complex/2.cc: Likewise.
	* testsuite/26_numerics/complex/comparison_operators/more_constexpr.cc:
	Likewise.
	* testsuite/26_numerics/complex/operators/more_constexpr.cc:
	Likewise.
	* testsuite/26_numerics/complex/requirements/more_constexpr.cc:
	Likewise.
	* testsuite/26_numerics/complex/value_operations/more_constexpr.cc:
	Likewise.
	* testsuite/26_numerics/endian/1.cc: Likewise.
	* testsuite/26_numerics/endian/2.cc: Likewise.
	* testsuite/26_numerics/endian/3.cc: Likewise.
	* testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
	* testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
	* testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
	* testsuite/26_numerics/inner_product/lwg2055.cc: Likewise.
	* testsuite/26_numerics/iota/constexpr.cc: Likewise.
	* testsuite/26_numerics/lerp/1.cc: Likewise.
	* testsuite/26_numerics/lerp/constexpr.cc: Likewise.
	* testsuite/26_numerics/lerp/version.cc: Likewise.
	* testsuite/26_numerics/midpoint/floating.cc: Likewise.
	* testsuite/26_numerics/midpoint/integral.cc: Likewise.
	* testsuite/26_numerics/midpoint/pointer.cc: Likewise.
	* testsuite/26_numerics/midpoint/pointer_neg.cc: Likewise.
	* testsuite/26_numerics/midpoint/version.cc: Likewise.
	* testsuite/26_numerics/numbers/1.cc: Likewise.
	* testsuite/26_numerics/numbers/2.cc: Likewise.
	* testsuite/26_numerics/numbers/3.cc: Likewise.
	* testsuite/26_numerics/numbers/float128.cc: Likewise.
	* testsuite/26_numerics/numbers/nonfloat_neg.cc: Likewise.
	* testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
	* testsuite/26_numerics/partial_sum/lwg2055.cc: Likewise.
	* testsuite/26_numerics/random/concept.cc: Likewise.
	* testsuite/26_numerics/reduce/constexpr.cc: Likewise.
	* testsuite/26_numerics/slice/compare.cc: Likewise.
	* testsuite/26_numerics/transform_exclusive_scan/constexpr.cc:
	Likewise.
	* testsuite/26_numerics/transform_inclusive_scan/constexpr.cc:
	Likewise.
	* testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
2023-09-16 00:10:45 +01:00
Jonathan Wakely
762baaf026 libstdc++: Remove dg-options "-std=gnu++20" from 24_iterators tests
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/24_iterators/aliases.cc: Remove dg-options
	-std=gnu++2a.
	* testsuite/24_iterators/associated_types/incrementable.traits.cc:
	Likewise.
	* testsuite/24_iterators/associated_types/iterator.traits.cc:
	Likewise.
	* testsuite/24_iterators/associated_types/readable.traits.cc:
	Likewise.
	* testsuite/24_iterators/back_insert_iterator/constexpr.cc:
	Likewise.
	* testsuite/24_iterators/back_insert_iterator/pr93884.cc:
	Likewise.
	* testsuite/24_iterators/bidirectional/concept.cc: Likewise.
	* testsuite/24_iterators/common_iterator/1.cc: Likewise.
	* testsuite/24_iterators/common_iterator/100823.cc: Likewise.
	* testsuite/24_iterators/common_iterator/2.cc: Likewise.
	* testsuite/24_iterators/contiguous/concept.cc: Likewise.
	* testsuite/24_iterators/contiguous/tag.cc: Likewise.
	* testsuite/24_iterators/counted_iterator/1.cc: Likewise.
	* testsuite/24_iterators/counted_iterator/lwg3389.cc: Likewise.
	* testsuite/24_iterators/counted_iterator/lwg3643.cc: Likewise.
	* testsuite/24_iterators/customization_points/92894.cc:
	Likewise.
	* testsuite/24_iterators/customization_points/iter_move.cc:
	Likewise.
	* testsuite/24_iterators/customization_points/iter_swap.cc:
	Likewise.
	* testsuite/24_iterators/customization_points/lwg3420.cc:
	Likewise.
	* testsuite/24_iterators/forward/concept.cc: Likewise.
	* testsuite/24_iterators/front_insert_iterator/constexpr.cc:
	Likewise.
	* testsuite/24_iterators/front_insert_iterator/pr93884.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
	Likewise.
	* testsuite/24_iterators/indirect_callable/92894.cc: Likewise.
	* testsuite/24_iterators/indirect_callable/projected-adl.cc:
	Likewise.
	* testsuite/24_iterators/indirect_callable/projected.cc:
	Likewise.
	* testsuite/24_iterators/input/concept.cc: Likewise.
	* testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
	* testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
	Likewise.
	* testsuite/24_iterators/istream_iterator/sentinel.cc: Likewise.
	* testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
	Likewise.
	* testsuite/24_iterators/istreambuf_iterator/sentinel.cc:
	Likewise.
	* testsuite/24_iterators/move_iterator/cust.cc: Likewise.
	* testsuite/24_iterators/move_iterator/dr3435.cc: Likewise.
	* testsuite/24_iterators/move_iterator/input_iterator.cc:
	Likewise.
	* testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
	* testsuite/24_iterators/move_iterator/lwg3391.cc: Likewise.
	* testsuite/24_iterators/move_iterator/move_only.cc: Likewise.
	* testsuite/24_iterators/move_iterator/p2520r0.cc: Likewise.
	* testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
	Likewise.
	* testsuite/24_iterators/move_iterator/sentinel.cc: Likewise.
	* testsuite/24_iterators/normal_iterator/cmp_c++20.cc: Likewise.
	* testsuite/24_iterators/output/concept.cc: Likewise.
	* testsuite/24_iterators/random_access/concept.cc: Likewise.
	* testsuite/24_iterators/range_access/range_access_cpp20.cc:
	Likewise.
	* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
	Likewise.
	* testsuite/24_iterators/range_operations/100768.cc: Likewise.
	* testsuite/24_iterators/range_operations/advance.cc: Likewise.
	* testsuite/24_iterators/range_operations/advance_overflow.cc:
	Likewise.
	* testsuite/24_iterators/range_operations/distance.cc: Likewise.
	* testsuite/24_iterators/range_operations/lwg3392.cc: Likewise.
	* testsuite/24_iterators/range_operations/next.cc: Likewise.
	* testsuite/24_iterators/range_operations/prev.cc: Likewise.
	* testsuite/24_iterators/reverse_iterator/cust.cc: Likewise.
	* testsuite/24_iterators/reverse_iterator/dr3435.cc: Likewise.
	* testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
	Likewise.
2023-09-16 00:10:45 +01:00
Jonathan Wakely
b9a2dce8c4 libstdc++: Remove dg-options "-std=gnu++20" from 23_containers tests
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/23_containers/array/comparison_operators/96851.cc:
	Remove dg-options -std=gnu++2a.
	* testsuite/23_containers/array/comparison_operators/constexpr.cc:
	Likewise.
	* testsuite/23_containers/array/creation/1.cc: Likewise.
	* testsuite/23_containers/array/creation/110167.cc: Likewise.
	* testsuite/23_containers/array/creation/2.cc: Likewise.
	* testsuite/23_containers/array/creation/3_neg.cc: Likewise.
	* testsuite/23_containers/array/requirements/constexpr_fill.cc:
	Likewise.
	* testsuite/23_containers/array/requirements/constexpr_swap.cc:
	Likewise.
	* testsuite/23_containers/deque/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/deque/erasure.cc: Likewise.
	* testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/deque/operators/cmp_c++20.cc:
	Likewise.
	* testsuite/23_containers/forward_list/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/forward_list/erasure.cc: Likewise.
	* testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/forward_list/operations/remove_cxx20_return.cc:
	Likewise.
	* testsuite/23_containers/forward_list/operations/unique_cxx20_return.cc:
	Likewise.
	* testsuite/23_containers/list/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/list/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/list/erasure.cc: Likewise.
	* testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/list/operations/remove_cxx20_return.cc:
	Likewise.
	* testsuite/23_containers/list/operations/unique_cxx20_return.cc:
	Likewise.
	* testsuite/23_containers/map/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/map/erasure.cc: Likewise.
	* testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/map/operations/contains.cc: Likewise.
	* testsuite/23_containers/map/operators/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/multimap/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/multimap/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/multimap/operators/cmp_c++20.cc:
	Likewise.
	* testsuite/23_containers/multiset/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/multiset/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/multiset/operators/cmp_c++20.cc:
	Likewise.
	* testsuite/23_containers/priority_queue/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/queue/92878_92947.cc: Likewise.
	* testsuite/23_containers/queue/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/set/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/set/erasure.cc: Likewise.
	* testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/set/operations/contains.cc: Likewise.
	* testsuite/23_containers/set/operators/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/span/1.cc: Likewise.
	* testsuite/23_containers/span/101411.cc: Likewise.
	* testsuite/23_containers/span/2.cc: Likewise.
	* testsuite/23_containers/span/deduction.cc: Likewise.
	* testsuite/23_containers/span/explicit.cc: Likewise.
	* testsuite/23_containers/span/layout_compat.cc: Likewise.
	* testsuite/23_containers/span/lwg3255.cc: Likewise.
	* testsuite/23_containers/span/nothrow_cons.cc: Likewise.
	* testsuite/23_containers/span/trivially_copyable.cc: Likewise.
	* testsuite/23_containers/stack/92878_92947.cc: Likewise.
	* testsuite/23_containers/stack/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/unordered_map/48101-3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
	* testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/operations/1.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/48101-3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/operations/1.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/48101-3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/operations/1.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/48101-3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/erasure.cc: Likewise.
	* testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/operations/1.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/operations/contains.cc:
	Likewise.
	* testsuite/23_containers/vector/48101-3_neg.cc: Likewise.
	* testsuite/23_containers/vector/bool/capacity/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/vector/bool/cons/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/element_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/iterator_c++20.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/assign/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/swap/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/capacity/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/cmp_c++20.cc: Likewise.
	* testsuite/23_containers/vector/cons/constexpr.cc: Likewise.
	* testsuite/23_containers/vector/data_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/element_access/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/erasure.cc: Likewise.
	* testsuite/23_containers/vector/modifiers/assign/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/swap/constexpr.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/version.cc:
	Likewise.
2023-09-16 00:10:45 +01:00
Jonathan Wakely
d8c446a147 libstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests
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/21_strings/basic_string/cons/char/105995.cc: Remove
	dg-options -std=gnu++20.
	* testsuite/21_strings/basic_string/cons/char/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string/erasure.cc: Likewise.
	* testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string/literals/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/ends_with/char.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/starts_with/char.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/range.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/constexpr.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
	Likewise.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
	Likewise.
2023-09-16 00:10:45 +01:00
Jonathan Wakely
6d0b43f5b8 libstdc++: Remove dg-options "-std=gnu++20" from 20_utils tests
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/allocator/105975.cc: Remove dg-options
	-std=gnu++2a.
	* testsuite/20_util/allocator/rebind_c++20.cc: Likewise.
	* testsuite/20_util/allocator/requirements/constexpr.cc:
	Likewise.
	* testsuite/20_util/allocator/requirements/typedefs_c++20.cc:
	Likewise.
	* testsuite/20_util/allocator_traits/header-2.cc: Likewise.
	* testsuite/20_util/allocator_traits/header.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/92878_92947.cc:
	Likewise.
	* testsuite/20_util/any/assign/92878_92947.cc: Likewise.
	* testsuite/20_util/any/cons/92878_92947.cc: Likewise.
	* testsuite/20_util/assume_aligned/1.cc: Likewise.
	* testsuite/20_util/assume_aligned/2_neg.cc: Likewise.
	* testsuite/20_util/assume_aligned/3.cc: Likewise.
	* testsuite/20_util/assume_aligned/97132.cc: Likewise.
	* testsuite/20_util/bind/constexpr.cc: Likewise.
	* testsuite/20_util/bitset/operations/96303.cc: Likewise.
	* testsuite/20_util/common_reference/100894.cc: Likewise.
	* testsuite/20_util/common_reference/requirements/alias_decl.cc:
	Likewise.
	* testsuite/20_util/common_reference/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/common_reference/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/duration/comparison_operators/three_way.cc:
	Likewise.
	* testsuite/20_util/exchange/constexpr.cc: Likewise.
	* testsuite/20_util/exchange/noexcept.cc: Likewise.
	* testsuite/20_util/from_chars/1_c++20_neg.cc: Likewise.
	* testsuite/20_util/from_chars/compare.cc: Likewise.
	* testsuite/20_util/function_objects/bind_front/1.cc: Likewise.
	* testsuite/20_util/function_objects/bind_front/107784.cc:
	Likewise.
	* testsuite/20_util/function_objects/bind_front/111327.cc:
	Likewise.
	* testsuite/20_util/function_objects/bind_front/2.cc: Likewise.
	* testsuite/20_util/function_objects/bind_front/97101.cc:
	Likewise.
	* testsuite/20_util/function_objects/bind_front/constexpr.cc:
	Likewise.
	* testsuite/20_util/function_objects/constexpr_searcher.cc:
	Likewise.
	* testsuite/20_util/function_objects/identity/1.cc: Likewise.
	* testsuite/20_util/function_objects/invoke/constexpr.cc:
	Likewise.
	* testsuite/20_util/function_objects/mem_fn/constexpr.cc:
	Likewise.
	* testsuite/20_util/function_objects/not_fn/constexpr.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/1.cc: Likewise.
	* testsuite/20_util/integer_comparisons/2.cc: Likewise.
	* testsuite/20_util/integer_comparisons/equal.cc: Likewise.
	* testsuite/20_util/integer_comparisons/equal_neg.cc: Likewise.
	* testsuite/20_util/integer_comparisons/greater.cc: Likewise.
	* testsuite/20_util/integer_comparisons/greater_equal.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/greater_equal_neg.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/greater_neg.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/in_range.cc: Likewise.
	* testsuite/20_util/integer_comparisons/in_range_neg.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/less.cc: Likewise.
	* testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
	* testsuite/20_util/integer_comparisons/less_equal_neg.cc:
	Likewise.
	* testsuite/20_util/integer_comparisons/less_neg.cc: Likewise.
	* testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
	* testsuite/20_util/integer_comparisons/not_equal_neg.cc:
	Likewise.
	* testsuite/20_util/is_bounded_array/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/is_bounded_array/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_bounded_array/value.cc: Likewise.
	* testsuite/20_util/is_constant_evaluated/1.cc: Likewise.
	* testsuite/20_util/is_constant_evaluated/noexcept.cc: Likewise.
	* testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
	* testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
	Likewise.
	* testsuite/20_util/is_layout_compatible/value.cc: Likewise.
	* testsuite/20_util/is_layout_compatible/version.cc: Likewise.
	* testsuite/20_util/is_nothrow_constructible/value_c++20.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_convertible/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_convertible/value.cc: Likewise.
	* testsuite/20_util/is_pod/deprecated-2a.cc: Likewise.
	* testsuite/20_util/is_pointer_interconvertible/value.cc:
	Likewise.
	* testsuite/20_util/is_pointer_interconvertible/version.cc:
	Likewise.
	* testsuite/20_util/is_pointer_interconvertible/with_class.cc:
	Likewise.
	* testsuite/20_util/is_unbounded_array/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/is_unbounded_array/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_unbounded_array/value.cc: Likewise.
	* testsuite/20_util/optional/assignment/92878_92947.cc:
	Likewise.
	* testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
	* testsuite/20_util/optional/constexpr/assign.cc: Likewise.
	* testsuite/20_util/optional/constexpr/cons/conv.cc: Likewise.
	* testsuite/20_util/optional/constexpr/modifiers.cc: Likewise.
	* testsuite/20_util/optional/constexpr/swap.cc: Likewise.
	* testsuite/20_util/optional/relops/96269.cc: Likewise.
	* testsuite/20_util/optional/relops/three_way.cc: Likewise.
	* testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc:
	Likewise.
	* testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
	* testsuite/20_util/pair/constexpr_assign.cc: Likewise.
	* testsuite/20_util/pair/constexpr_swap.cc: Likewise.
	* testsuite/20_util/pair/requirements/structural.cc: Likewise.
	* testsuite/20_util/pointer_traits/pointer_to_constexpr.cc:
	Likewise.
	* testsuite/20_util/polymorphic_allocator/allocate_object.cc:
	Likewise.
	* testsuite/20_util/polymorphic_allocator/construct_c++2a.cc:
	Likewise.
	* testsuite/20_util/polymorphic_allocator/lwg3237.cc: Likewise.
	* testsuite/20_util/reference_wrapper/constexpr.cc: Likewise.
	* testsuite/20_util/reference_wrapper/incomplete.cc: Likewise.
	* testsuite/20_util/remove_cvref/requirements/alias_decl.cc:
	Likewise.
	* testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/remove_cvref/value.cc: Likewise.
	* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
	* testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/alias-rval.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/92878_92947.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/overwrite.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/version.cc: Likewise.
	* testsuite/20_util/time_point/4.cc: Likewise.
	* testsuite/20_util/time_point/comparison_operators/three_way.cc:
	Likewise.
	* testsuite/20_util/to_address/1.cc: Likewise.
	* testsuite/20_util/to_address/1_neg.cc: Likewise.
	* testsuite/20_util/to_address/debug.cc: Likewise.
	* testsuite/20_util/to_address/lwg3545.cc: Likewise.
	* testsuite/20_util/to_chars/compare.cc: Likewise.
	* testsuite/20_util/tuple/comparison_operators/three_way.cc:
	Likewise.
	* testsuite/20_util/tuple/cons/102270.cc: Likewise.
	* testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc:
	Likewise.
	* testsuite/20_util/tuple/constexpr_swap.cc: Likewise.
	* testsuite/20_util/type_identity/requirements/alias_decl.cc:
	Likewise.
	* testsuite/20_util/type_identity/requirements/explicit_instantiation.cc:
	Likewise.
	* testsuite/20_util/type_identity/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/typeindex/comparison_operators_c++20.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/comparison/compare_c++20.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/creation/92878_92947.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/creation/for_overwrite.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/io/lwg2948.cc: Likewise.
	* testsuite/20_util/unwrap_reference/1.cc: Likewise.
	* testsuite/20_util/unwrap_reference/2.cc: Likewise.
	* testsuite/20_util/unwrap_reference/3.cc: Likewise.
	* testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
	* testsuite/20_util/uses_allocator/lwg3527.cc: Likewise.
	* testsuite/20_util/uses_allocator/make_obj.cc: Likewise.
	* testsuite/20_util/uses_allocator/uninitialized_construct.cc:
	Likewise.
	* testsuite/20_util/variant/92878_92947.cc: Likewise.
	* testsuite/20_util/variant/95915.cc: Likewise.
	* testsuite/20_util/variant/constexpr.cc: Likewise.
	* testsuite/20_util/variant/relops/three_way.cc: Likewise.
	* testsuite/20_util/variant/visit_neg.cc: Likewise.
	* testsuite/20_util/variant/visit_r.cc: Likewise.
	* testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
2023-09-16 00:10:45 +01:00
Jonathan Wakely
771752c4e3 libstdc++: Remove dg-options "-std=gnu++20" from <compare> tests
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/18_support/comparisons/algorithms/fallback.cc:
	Remove dg-options -std=gnu++2a.
	* testsuite/18_support/comparisons/algorithms/partial_order.cc:
	Likewise.
	* testsuite/18_support/comparisons/algorithms/strong_order.cc:
	Likewise.
	* testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
	Likewise.
	* testsuite/18_support/comparisons/algorithms/weak_order.cc:
	Likewise.
	* testsuite/18_support/comparisons/categories/94565.cc:
	Likewise.
	* testsuite/18_support/comparisons/categories/partialord.cc:
	Likewise.
	* testsuite/18_support/comparisons/categories/strongord.cc:
	Likewise.
	* testsuite/18_support/comparisons/categories/weakord.cc:
	Likewise.
	* testsuite/18_support/comparisons/categories/zero_neg.cc:
	Likewise.
	* testsuite/18_support/comparisons/common/1.cc: Likewise.
	* testsuite/18_support/comparisons/object/93479.cc: Likewise.
	* testsuite/18_support/comparisons/object/lwg3530.cc: Likewise.
2023-09-16 00:10:44 +01:00
Jonathan Wakely
1b13c424da libstdc++: Remove dg-options "-std=gnu++20" from <atomic> tests
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/29_atomics/atomic/compare_exchange_padding.cc:
	Remove dg-options -std=gnu++2a.
	* testsuite/29_atomics/atomic/cons/value_init.cc: Likewise.
	* testsuite/29_atomics/atomic/lock_free_aliases.cc: Likewise.
	* testsuite/29_atomics/atomic/requirements/types_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic/wait_notify/1.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/100334.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/102994.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/bool.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
	* testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/cons/value_init.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/test/explicit.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
	* testsuite/29_atomics/atomic_float/1.cc: Likewise.
	* testsuite/29_atomics/atomic_float/95282.cc: Likewise.
	* testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
	* testsuite/29_atomics/atomic_float/value_init.cc: Likewise.
	* testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/value_init.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
	Likewise.
	* testsuite/29_atomics/atomic_ref/deduction.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/float.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/generic.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/integral.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/pointer.cc: Likewise.
	* testsuite/29_atomics/atomic_ref/requirements.cc: Likewise.
	* testsuite/29_atomics/headers/atomic/types_std_c++20.cc:
	Likewise.
	* testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc:
	Likewise.
	* testsuite/29_atomics/headers/atomic/types_std_c++2a.cc:
	Likewise.
	* testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc:
	Likewise.
2023-09-16 00:10:44 +01:00
Jonathan Wakely
6693bd9004 libstdc++: Add missing tests for std::basic_filebuf::native_handle()
I forgot to 'git add' these files in the commit that added the new
member function to basic_filebuf.

libstdc++-v3/ChangeLog:

	* testsuite/27_io/basic_filebuf/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_filebuf/native_handle/wchar_t/1.cc: New test.
2023-09-16 00:10:44 +01:00
Jonathan Wakely
c4baeaecbb libstdc++: Implement C++26 native handles for file streams (P1759R6)
The new __basic_file::native_handle() function can be added for C++11
and above, because the names "native_handle" and "native_handle_type"
are already reserved since C++11. Exporting those symbols from the
shared library does no harm, even if the feature gets dropped before the
C++23 standard is final.

The new member functions of std::fstream etc. are only declared for
C++26 and so are not instantiated in src/c++11/fstream-inst.cc. Declare
them with the always_inline attribute so that no symbol definitions are
needed in the library (we can change this later when C++26 support is
less experimental).

libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES): New
	macro.
	* config.h.in: Regenerate.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.32): Export new
	basic_filebuf members.
	* config/io/basic_file_stdio.cc (__basic_file::native_handle):
	Define new function.
	* config/io/basic_file_stdio.h (__basic_file::native_handle):
	Declare new function.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES.
	* include/bits/version.def (fstream_native_handles): New macro.
	* include/bits/version.h: Regenerate.
	* include/std/fstream (basic_filebuf::native_handle)
	(basic_fstream::native_handle, basic_ifstream::native_handle)
	(basic_ofstream::native_handle): New functions.
	* src/c++11/Makefile.am: Move compilation of basic_file.cc,
	locale_init.cc and localename.cc to here.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++98/locale_init.cc: Moved to...
	* src/c++11/locale_init.cc: ...here.
	* src/c++98/localename.cc: Moved to...
	* src/c++11/localename.cc: ...here.
	* src/c++98/Makefile.am: Remove basic_file.cc, locale_init.cc
	and localename.cc from here.
	* src/c++98/Makefile.in: Regenerate.
	* testsuite/27_io/basic_filebuf/native_handle/version.cc: New test.
	* testsuite/27_io/basic_fstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_fstream/native_handle/wchar_t/1.cc: New test.
	* testsuite/27_io/basic_ifstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_ifstream/native_handle/wchar_t/1.cc: New test.
	* testsuite/27_io/basic_ofstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_ofstream/native_handle/wchar_t/1.cc: New test.
2023-09-15 21:57:41 +01:00
Jonathan Wakely
a923c52920 libstdc++: Add log line to testsuite output
Write a line to the log when using a testsuite_files file.

libstdc++-v3/ChangeLog:

	* testsuite/libstdc++-dg/conformance.exp: Add log line when
	using testsuite_files.
2023-09-15 21:57:40 +01:00
Jonathan Wakely
8cd5e57b25 libstdc++: Simplify dejagnu directives for some tests using threads
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.
2023-09-15 21:57:40 +01:00
Jonathan Wakely
ed8fcd0df5 libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests
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.
2023-09-15 21:57:40 +01:00
Jonathan Wakely
7810fb3a14 libstdc++: Remove dg-options "-std=gnu++23" from remaining tests
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.
2023-09-15 21:57:40 +01:00
Jonathan Wakely
5188b4028d libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests
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.
2023-09-15 21:57:40 +01:00
Jonathan Wakely
41cd9d4dfe libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests
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.
2023-09-15 21:57:39 +01:00
Jonathan Wakely
4c0fbba393 libstdc++: Remove dg-options "-std=gnu++20" from std::format tests
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.
	* 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.
2023-09-15 21:57:39 +01:00
Jonathan Wakely
7dbb691309 libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests
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.
2023-09-15 21:57:39 +01:00
Jonathan Wakely
d4ac20b0af libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests
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.
2023-09-15 21:57:39 +01:00
Jonathan Wakely
5d066729ff libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests
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.
2023-09-15 21:57:39 +01:00
Jonathan Wakely
07c602bbbd libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std
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.
2023-09-15 21:57:38 +01:00
Jonathan Wakely
c4bf6e8e8a libstdc++: Replace dg-options "-std=c++17" with dg-add-options strict_std
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.
2023-09-15 21:57:38 +01:00
Jonathan Wakely
52841fb703 libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std
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.
2023-09-15 21:57:38 +01:00
Jonathan Wakely
3a0e01f6bb libstdc++: Add support for running tests with multiple -std options
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.
2023-09-15 21:57:38 +01:00