https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123180
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:630c1bfbb5bc3ba9fafca5e97096263ab8f0a04b commit r16-6246-g630c1bfbb5bc3ba9fafca5e97096263ab8f0a04b Author: Jonathan Wakely <[email protected]> Date: Thu Dec 18 10:38:31 2025 +0000 libstdc++: Fix ranges::stable_sort handling of null buffer [PR123180] The logic of the null pointer check got reversed when converting the std::stable_sort code for ranges::stable_sort. libstdc++-v3/ChangeLog: PR libstdc++/123180 * include/bits/ranges_algo.h (__stable_sort_fn::operator()): Fix sense of null check. Replace typedef with alias-declaration. * testsuite/25_algorithms/stable_sort/123180.cc: New test. Reviewed-by: Patrick Palka <[email protected]>
