https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111685
--- Comment #3 from Kyle Knoepfel <knoepfel at fnal dot gov> --- @Andrew Pinski, yes I surmised as much. My difficulty, though, is in understanding if this is the correct behavior according to the standard's specification of std::sort, which presumably is reasonably summarized in the type requirements listed at https://en.cppreference.com/w/cpp/algorithm/sort. Which formal requirements/preconditions are being violated by cmp?