http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51572
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-16 13:16:19 UTC --- At least the ICE we hit for the limbo node: if (DECL_P (node->created_for)) context = DECL_CONTEXT (node->created_for); else if (TYPE_P (node->created_for)) context = TYPE_CONTEXT (node->created_for); gcc_assert (context && (TREE_CODE (context) == FUNCTION_DECL || TREE_CODE (context) == NAMESPACE_DECL)); origin = lookup_decl_die (context); if (origin) add_child_die (origin, die); else add_child_die (comp_unit_die (), die); is odd, as the fallback for a non-existant context DIE is to attach the DIE to the comp-unit-die. So why not allow a comp-unit-die context in the first place? Thus, allow SCOPE_FILE_SCOPE_P limbo DIEs?