sort.cxx: ========= #include <algorithm> #include <vector> void foo() { std::vector<int> v; std::stable_sort(v.begin(), v.end()); } =======
% gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /disks/arlene/gnu/gcc-4.3.0/configure --prefix=/usr/local/gcc-4.3.0-x86_64-redhat-linux --with-gnu-as --with-as=/usr/local/gcc-4.3.0-x86_64-redhat-linux/bin/as --with-gnu-ld --with-ld=/usr/local/gcc-4.3.0-x86_64-redhat-linux/bin/ld --enable-threads=posix --with-dwarf2 --disable-shared --enable-languages=c++ --enable-__cxa_atexit --with-pic --enable-checking=release --with-gmp --with-mpfr Thread model: posix gcc version 4.3.0 (GCC) % gcc -c sort.cxx % gcc -c sort.cxx -D_GLIBCXX_DEBUG [ Large number of errors, ending with ] sort.cxx:8: instantiated from here /export/disk2/local/gcc-4.3.0-x86_64-redhat-linux/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/debug/functions.h:317: error: no matching function for call to '__check_sorted_set_aux(int* const&, int* const&, __gnu_debug::__check_sorted_set(const _InputIterator1&, const _InputIterator1&, const _InputIterator2&) [with _InputIterator1 = int*, _InputIterator2 = int*]::_SameType)' This worked in 4.2.3 (and 4.0.4). It also works in 4.3.0 using std::sort and instead of std::stable_sort -- Summary: std::stable_sort unusable with _GLIBCXX_DEBUG Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Andrew_Pollard at amat dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35656