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
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
23_containers libstdc++: Fix typos in tests 2021-11-16 14:08:42 +00:00
24_iterators
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
29_atomics
30_threads
abi
backward
config
data
decimal
experimental libstdc++: Fix out-of-bound array accesses in testsuite 2021-11-16 14:09:00 +00:00
ext
lib libstdc++: Add xfail to pretty printer tests that fail in C++20 2021-11-05 12:22:31 +00:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Add xfail to pretty printer tests that fail in C++20 2021-11-05 12:22:31 +00:00
libstdc++-xmethods
performance
special_functions
std
tr1
tr2
util libstdc++: Fix std::type_info::before for ARM [PR103240] 2021-11-17 17:21:24 +00:00
Makefile.am
Makefile.in