gcc/libstdc++-v3/testsuite
Jonathan Wakely eae41b4d2c libstdc++: Prevent -Wstringop-overread warning in std::deque [PR100516]
The compiler warns about the loop in deque::_M_range_initialize because
it doesn't know that the number of nodes has already been correctly
sized to match the size of the input. Use __builtin_unreachable to tell
it that the loop will never be entered if the number of elements is
smaller than a single node.

libstdc++-v3/ChangeLog:

	PR libstdc++/100516
	* include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
	Add __builtin_unreachable to loop.
	* testsuite/23_containers/deque/100516.cc: New test.
2022-01-27 23:31:03 +00:00
..
17_intro libstdc++: Rename non-reserved macros in config header [PR103650] 2022-01-17 12:08:26 +00:00
18_support Testsuite: Make dependence on -fdelete-null-pointer-checks explicit 2022-01-08 22:17:18 -08:00
19_diagnostics
20_util libstdc++: Fix typo in comment 2022-01-21 16:07:34 +00:00
21_strings libstdc++: Limit new basic_string(nullptr_t) constructor to C++23 [PR104099] 2022-01-18 20:41:46 +00:00
22_locale libstdc++: Fix 22_locale/numpunct/members/char/3.cc execution test 2022-01-14 16:21:57 +01:00
23_containers libstdc++: Prevent -Wstringop-overread warning in std::deque [PR100516] 2022-01-27 23:31:03 +00:00
24_iterators libstdc++: Avoid overflow in ranges::advance(i, n, bound) 2022-01-27 22:24:29 +00:00
25_algorithms libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
26_numerics
27_io libstdc++: Fix std::spanstream move assignment [PR104032] 2022-01-23 22:48:33 +00:00
28_regex libstdc++: Add dg-timeout-factor to some more regex tests 2022-01-10 12:18:14 +00:00
29_atomics libstdc++: Include <stddef.h> for size_t and ptrdiff_t [PR104123] 2022-01-19 17:40:37 +00:00
30_threads
abi
backward
config
data
decimal
experimental
ext libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
lib libstdc++: Define <stacktrace> header for C++23 2022-01-17 12:13:02 +00:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance libstdc++: Optimize operations on small size hashtable [PR 68303] 2022-01-05 21:46:52 +01:00
special_functions
std libstdc++: Make copyable-box completely constexpr (LWG 3572) 2022-01-11 15:17:26 +00:00
tr1 libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
tr2
util libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
Makefile.am
Makefile.in libstdc++: Define <stacktrace> header for C++23 2022-01-17 12:13:02 +00:00