gcc/libstdc++-v3/testsuite/25_algorithms
Jonathan Wakely 0fd9e8482e PR libstdc++/90920 restore previous checks for empty ranges
The change in r263433 broke the contract of the __rotate functions, by no
longer accepting empty ranges. That means that callers which inlined the
old version of std::rotate (without checks) that end up linking to a new
definition of std::__rotate (also without checks) could perform a divide
by zero and crash.

This restores the old contract of the __rotate overloads.

	PR libstdc++/90920 partially revert r263433
	* include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
	(rotate): Remove checks.
	* testsuite/25_algorithms/rotate/90920.cc: New test.

From-SVN: r272489
2019-06-19 23:57:02 +01:00
..
adjacent_find Update copyright years. 2019-01-01 13:31:55 +01:00
advance/istreambuf_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
all_of Update copyright years. 2019-01-01 13:31:55 +01:00
any_of Update copyright years. 2019-01-01 13:31:55 +01:00
binary_search Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
clamp Update copyright years. 2019-01-01 13:31:55 +01:00
copy Update copyright years. 2019-01-01 13:31:55 +01:00
copy_backward Update copyright years. 2019-01-01 13:31:55 +01:00
copy_if Update copyright years. 2019-01-01 13:31:55 +01:00
copy_n Update copyright years. 2019-01-01 13:31:55 +01:00
count Update copyright years. 2019-01-01 13:31:55 +01:00
count_if Update copyright years. 2019-01-01 13:31:55 +01:00
equal Update copyright years. 2019-01-01 13:31:55 +01:00
equal_range Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
fill Update copyright years. 2019-01-01 13:31:55 +01:00
fill_n PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter 2019-04-29 13:12:43 +01:00
find Update copyright years. 2019-01-01 13:31:55 +01:00
find_end Update copyright years. 2019-01-01 13:31:55 +01:00
find_first_of Update copyright years. 2019-01-01 13:31:55 +01:00
find_if Update copyright years. 2019-01-01 13:31:55 +01:00
find_if_not Update copyright years. 2019-01-01 13:31:55 +01:00
for_each Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
generate/requirements/explicit_instantiation Update copyright years. 2019-01-01 13:31:55 +01:00
generate_n PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter 2019-04-29 13:12:43 +01:00
headers Update copyright years. 2019-01-01 13:31:55 +01:00
heap Update copyright years. 2019-01-01 13:31:55 +01:00
includes Update copyright years. 2019-01-01 13:31:55 +01:00
inplace_merge Update copyright years. 2019-01-01 13:31:55 +01:00
is_heap Update copyright years. 2019-01-01 13:31:55 +01:00
is_heap_until Update copyright years. 2019-01-01 13:31:55 +01:00
is_partitioned Update copyright years. 2019-01-01 13:31:55 +01:00
is_permutation Update copyright years. 2019-01-01 13:31:55 +01:00
is_sorted Update copyright years. 2019-01-01 13:31:55 +01:00
is_sorted_until Update copyright years. 2019-01-01 13:31:55 +01:00
iter_swap Update copyright years. 2019-01-01 13:31:55 +01:00
lexicographical_compare Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
lower_bound Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
make_heap Update copyright years. 2019-01-01 13:31:55 +01:00
max Update copyright years. 2019-01-01 13:31:55 +01:00
max_element Update copyright years. 2019-01-01 13:31:55 +01:00
merge Update copyright years. 2019-01-01 13:31:55 +01:00
min Update copyright years. 2019-01-01 13:31:55 +01:00
min_element Update copyright years. 2019-01-01 13:31:55 +01:00
minmax Update copyright years. 2019-01-01 13:31:55 +01:00
minmax_element Update copyright years. 2019-01-01 13:31:55 +01:00
mismatch Update copyright years. 2019-01-01 13:31:55 +01:00
move Update copyright years. 2019-01-01 13:31:55 +01:00
move_backward Update copyright years. 2019-01-01 13:31:55 +01:00
next_permutation Update copyright years. 2019-01-01 13:31:55 +01:00
none_of Update copyright years. 2019-01-01 13:31:55 +01:00
nth_element Update copyright years. 2019-01-01 13:31:55 +01:00
partial_sort Update copyright years. 2019-01-01 13:31:55 +01:00
partial_sort_copy Update copyright years. 2019-01-01 13:31:55 +01:00
partition Update copyright years. 2019-01-01 13:31:55 +01:00
partition_copy Update copyright years. 2019-01-01 13:31:55 +01:00
partition_point Update copyright years. 2019-01-01 13:31:55 +01:00
pop_heap Update copyright years. 2019-01-01 13:31:55 +01:00
prev_permutation Update copyright years. 2019-01-01 13:31:55 +01:00
pstl Fix incorrect __cpp_lib_parallel_algorithm macro definitions 2019-06-12 21:16:03 +01:00
push_heap Update copyright years. 2019-01-01 13:31:55 +01:00
random_shuffle Update copyright years. 2019-01-01 13:31:55 +01:00
remove Update copyright years. 2019-01-01 13:31:55 +01:00
remove_copy/requirements/explicit_instantiation Update copyright years. 2019-01-01 13:31:55 +01:00
remove_copy_if Update copyright years. 2019-01-01 13:31:55 +01:00
remove_if Update copyright years. 2019-01-01 13:31:55 +01:00
replace Update copyright years. 2019-01-01 13:31:55 +01:00
replace_copy Update copyright years. 2019-01-01 13:31:55 +01:00
replace_copy_if Update copyright years. 2019-01-01 13:31:55 +01:00
replace_if Update copyright years. 2019-01-01 13:31:55 +01:00
reverse Update copyright years. 2019-01-01 13:31:55 +01:00
reverse_copy/explicit_instantiation Update copyright years. 2019-01-01 13:31:55 +01:00
rotate PR libstdc++/90920 restore previous checks for empty ranges 2019-06-19 23:57:02 +01:00
rotate_copy/requirements/explicit_instantiation Update copyright years. 2019-01-01 13:31:55 +01:00
sample Update copyright years. 2019-01-01 13:31:55 +01:00
search Update copyright years. 2019-01-01 13:31:55 +01:00
search_n Update copyright years. 2019-01-01 13:31:55 +01:00
set_difference Update copyright years. 2019-01-01 13:31:55 +01:00
set_intersection Update copyright years. 2019-01-01 13:31:55 +01:00
set_symmetric_difference Update copyright years. 2019-01-01 13:31:55 +01:00
set_union Update copyright years. 2019-01-01 13:31:55 +01:00
shuffle Update copyright years. 2019-01-01 13:31:55 +01:00
sort Update copyright years. 2019-01-01 13:31:55 +01:00
sort_heap Update copyright years. 2019-01-01 13:31:55 +01:00
stable_partition Update copyright years. 2019-01-01 13:31:55 +01:00
stable_sort Update copyright years. 2019-01-01 13:31:55 +01:00
swap Update copyright years. 2019-01-01 13:31:55 +01:00
swap_ranges Update copyright years. 2019-01-01 13:31:55 +01:00
transform/requirements/explicit_instantiation Update copyright years. 2019-01-01 13:31:55 +01:00
unique Update copyright years. 2019-01-01 13:31:55 +01:00
unique_copy Update copyright years. 2019-01-01 13:31:55 +01:00
upper_bound Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00