http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55617
--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 22:19:45 UTC --- Can you explain why normal qsort wouldn't do the sort in one pass? You just do if (ctor_recordA->priority > ctor_recordB->priority) return -1; if (ctor_recordA->priority < ctor_recordB->priority) return 1; if (ctor_recordA->position > ctor_recordB->position) return -1; if (ctor_recordA->postiion < ctor_recordB->position) return 1; return 0; in the comparison routine. The var names aren't very nice btw.