https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69513
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Ah, I guess a simpler patch could be to do while ((node = limbo_die_list)) { limbo_die_list = node->next; ... old code ... } I'd even approve that based on the fact we use get_context_die here. We could also avoid generating new DIEs here by falling back to comp_unit_die () if the context DIE doesn't exist yet (which it should with early debug, not with LTO in some circumstances of course as we see here).