http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51572
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-16 13:45:48 UTC --- Without LTO we create the DIE for the TU level typedef via debug_hooks->type_decl, called from rest_of_decl_compilation which ultimately being dwarf2out_decl, sets the context_die to comp_unit_die () manually. As we do not gather or merge TYPE_DECLs with LTO we do not call rest_of_decl_compilation for TYPE_DECLs. So, with non-LTO we do not run into this seeming inconsistency in dwarf2out.c.