https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113159
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jan Engelhardt from comment #4) > >And in upcoming Glibc-2.39 there will be a major reimplementation of qsort > > Even so, a recent commit strongly suggests that sticking to array bounds > remains important: So IIRC the reasoning is because of bugs in older (current as of a month ago even) versions of LLVM which crashes on a comparison with itself. Basically broken comparison functions are forcing workarounds really. Note GCC uses its own sort function due which is designed to detect the brokeness of comparison functions even; see PR 109187, PR 90282, PR 87281, PR 84345, etc.