https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65549
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Richard Biener from comment #6) > Btw, I always wondered why dwarf2out.c doesn't create such stubs itself when > it requires a parent (via force_decl_die). Most probably because dwarf2out.c has never been written with the current state of LTO in mind, it assumes the FE or the middle-end gives it sane and complete trees of everything needed. With early debug info, if done right for LTO, supposedly the problems goes away again, so either we add some hack for this and accept there are hundreds of other ways how to get it crashed with -flto -g (perhaps regression on some particular testcase, but generally all gcc versions with -flto -g contained lots of various ICEs), or just add this to other cases which show -flto -g is unsupportable until early debug info is added to GCC 6.