gcc/libstdc++-v3/testsuite
Jonathan Wakely ca243ada71 libstdc++: Fix std::char_traits<C>::move for constexpr
The constexpr branch in __gnu_cxx::char_traits::move compares the string
arguments to see if they overlap, but relational comparisons between
unrelated pointers are not core constant expressions.

I want to replace the comparisons with a loop using pointer equality to
determine whether the end of the source string is in the destination
string. However, that doesn't work with GCC, due to PR c++/89074 so
allocate a temporary buffer instead and copy out into that first, so
that overlapping source and destination don't matter. The allocation
isn't supported by the current Intel icc so use the loop as a fallback.

libstdc++-v3/ChangeLog:

	* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
	Do not compare unrelated pointers during constant evaluation.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
	Improve tests for char_traits::move.
2021-11-18 16:14:15 +00:00
..
17_intro libstdc++: Fix test for libstdc++ not including <unistd.h> [PR100117] 2021-11-10 12:03:29 +00:00
18_support libstdc++: Fix std::type_info::before for ARM [PR103240] 2021-11-17 17:21:24 +00:00
19_diagnostics libstdc++: Avoid unconditional use of errc::not_supported [PR 99327] 2021-10-01 20:34:50 +01:00
20_util c++: Add -fimplicit-constexpr 2021-11-15 18:50:07 -05:00
21_strings libstdc++: Fix std::char_traits<C>::move for constexpr 2021-11-18 16:14:15 +00:00
22_locale libstdc++: Remove unnecessary uses of _GLIBCXX_USE_WCHAR_T in testsuite [PR98725] 2021-10-09 00:57:50 +01:00
23_containers libstdc++: Fix typos in tests 2021-11-16 14:08:42 +00:00
24_iterators libstdc++: Implement LWG 3392 for std::ranges::distance 2021-10-01 20:36:54 +01:00
25_algorithms libstdc++: Missing constexpr for __gnu_debug::__valid_range etc 2021-11-01 21:01:31 +00:00
26_numerics c++: Add -fimplicit-constexpr 2021-11-15 18:50:07 -05:00
27_io libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
28_regex libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris 2021-10-26 14:07:57 +02:00
29_atomics libstdc++: Fix UB in atomic_ref/wait_notify.cc [PR101761] 2021-09-16 14:48:17 -07:00
30_threads libstdc++: Make std::jthread support pointers to member functions [PR 100612] 2021-10-01 20:36:55 +01:00
abi Update copyright years. 2021-01-04 10:26:59 +01:00
backward Update copyright years. 2021-01-04 10:26:59 +01:00
config Update copyright years. 2021-01-04 10:26:59 +01:00
data
decimal Update copyright years. 2021-01-04 10:26:59 +01:00
experimental libstdc++: Fix out-of-bound array accesses in testsuite 2021-11-16 14:09:00 +00:00
ext libstdc++: Remove unnecessary uses of _GLIBCXX_USE_WCHAR_T in testsuite [PR98725] 2021-10-09 00:57:50 +01:00
lib libstdc++: Add xfail to pretty printer tests that fail in C++20 2021-11-05 12:22:31 +00:00
libstdc++-abi Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-dg libstdc++: Add std::experimental::simd from the Parallelism TS 2 2021-01-27 16:37:26 +00:00
libstdc++-prettyprinters libstdc++: Add xfail to pretty printer tests that fail in C++20 2021-11-05 12:22:31 +00:00
libstdc++-xmethods Update copyright years. 2021-01-04 10:26:59 +01:00
performance Update copyright years. 2021-01-04 10:26:59 +01:00
special_functions Update copyright years. 2021-01-04 10:26:59 +01:00
std libstdc++: Implement P2432R1 changes for views::istream 2021-10-21 11:55:19 -04:00
tr1 libstdc++: Remove unnecessary uses of _GLIBCXX_USE_WCHAR_T in testsuite [PR98725] 2021-10-09 00:57:50 +01:00
tr2 Update copyright years. 2021-01-04 10:26:59 +01:00
util libstdc++: Fix std::type_info::before for ARM [PR103240] 2021-11-17 17:21:24 +00:00
Makefile.am libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00
Makefile.in libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00