https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 35105 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35105&action=edit gcc5-pr65521.patch This fixes this for me. But I haven't done any in-depth analysis whether the symtab order fields are always identical between -g and -g0.