diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-19 23:57:02 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-19 23:57:02 +0100 |
commit | 0fd9e8482e73ca8ed74ad390e507f9f922ccc5ce (patch) | |
tree | 507000ccbcd823d9cdebf76fd49b92b465ad3e42 /gcc/fortran | |
parent | c6f0626b11b25b4159489e4935086ea49d47c541 (diff) | |
download | gcc-0fd9e8482e73ca8ed74ad390e507f9f922ccc5ce.zip gcc-0fd9e8482e73ca8ed74ad390e507f9f922ccc5ce.tar.gz gcc-0fd9e8482e73ca8ed74ad390e507f9f922ccc5ce.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions