gcc/libstdc++-v3/testsuite
Jason Merrill 4ed1dc1275 c++: Fix defaulted <=> fallback to < and == [PR96299]
I thought I had implemented P1186R3, but apparently I didn't read it closely
enough to understand the point of the paper, namely that for a defaulted
operator<=>, if a member type doesn't have a viable operator<=>, we will use
its operator< and operator== if the defaulted operator has an specific
comparison category as its return type; the compiler can't guess if it
should be strong_ordering or something else, but the user can make that
choice explicit.

The libstdc++ test change was necessary because of the change in
genericize_spaceship from op0 > op1 to op1 < op0; this should be equivalent,
but isn't because of PR88173.

gcc/cp/ChangeLog:

	PR c++/96299
	* cp-tree.h (build_new_op): Add overload that omits some parms.
	(genericize_spaceship): Add location_t parm.
	* constexpr.c (cxx_eval_binary_expression): Pass it.
	* cp-gimplify.c (genericize_spaceship): Pass it.
	* method.c (genericize_spaceship): Handle class-type arguments.
	(build_comparison_op): Fall back to op</== when appropriate.

gcc/testsuite/ChangeLog:

	PR c++/96299
	* g++.dg/cpp2a/spaceship-synth-neg2.C: Move error.
	* g++.dg/cpp2a/spaceship-p1186.C: New test.

libstdc++-v3/ChangeLog:

	PR c++/96299
	* testsuite/18_support/comparisons/algorithms/partial_order.cc:
	One more line needs to use VERIFY instead of static_assert.
2020-12-08 15:12:25 -05:00
..
17_intro libstdc++: Fix test failure on AIX 2020-11-25 17:22:47 +00:00
18_support c++: Fix defaulted <=> fallback to < and == [PR96299] 2020-12-08 15:12:25 -05:00
19_diagnostics libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
20_util libstdc++: Set dg-timeout-factor for more slow tests 2020-11-30 14:39:54 +00:00
21_strings libstdc++: Make _GLIBCXX_DEBUG checks constexpr compatible 2020-11-09 21:11:13 +01:00
22_locale libstdc++: Avoid warnings in tests 2020-10-29 22:47:21 +00:00
23_containers libstdc++: Disable std::array assertions for C++11 constexpr 2020-12-03 17:08:01 +00:00
24_iterators libstdc++: Fix missing subsumption in std::iterator_traits [PR 97935] 2020-11-25 17:22:47 +00:00
25_algorithms libstdc++: Set dg-timeout-factor for more slow tests 2020-11-30 14:39:54 +00:00
26_numerics libstdc++: Fix typos in #error strings 2020-12-03 19:31:19 +00:00
27_io libstdc++: Use longer timeout for istream::gcount() overflow tests 2020-12-02 12:34:20 +00:00
28_regex libstdc++: Set dg-timeout-factor for more slow tests 2020-11-30 14:39:54 +00:00
29_atomics Add feature test macro for atomic<T>::wait 2020-12-01 15:43:17 -08:00
30_threads libstdc++: Add "futex" and "gthreads" effective-target keywords 2020-11-26 16:15:52 +00:00
abi
backward
config
data
decimal
experimental libstdc++: Fix -Wrange-loop-construct warnings in filesystem tests 2020-11-27 13:34:22 +00:00
ext Add support for detecting mismatched allocation/deallocation calls. 2020-12-03 15:43:32 -07:00
lib libstdc++: Use libatomic for tests on all 32-bit powerpc targets 2020-12-02 16:37:56 +00:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Fix filesystem::path pretty printer test failure 2020-12-02 00:39:21 +00:00
libstdc++-xmethods
performance libstdc++: Limit memory allocation in stable_sort/inplace_merge (PR 83938) 2020-11-20 22:25:04 +01:00
special_functions
std libstdc++: Fix ranges::join_view::_Iterator::operator-> [LWG 3500] 2020-11-18 10:23:57 -05:00
tr1 libstdc++: Prevent deprecation warnings from <tr1/shared_ptr> 2020-10-29 22:47:22 +00:00
tr2
util libstdc++: Fix testsuite helper functions [PR 97936] 2020-11-25 18:24:12 +00:00
Makefile.am libstdc++: Adjust variable export in makefile 2020-10-09 14:08:42 +01:00
Makefile.in libstdc++: Adjust variable export in makefile 2020-10-09 14:08:42 +01:00