On 06/01/2012 05:22 AM, Richard Guenther wrote:
On Thu, 31 May 2012, Jason Merrill wrote:
The comment mentions PCH in connection with deferred seting of
DECL_ASSEMBLER_NAME; off the top of my head it occurs to me that that might be
connected with anonymous unions, which need to have different linkage names in
different translation units.
Not sure when PCH generation happens (or when we call
rest_of_type_compilation), but shouldn't that be way earlier than
the debug output?
PCH generation happens at the beginning of cp_write_global_declarations;
rest_of_type_compilation, which triggers the debug output, is called
after each class definition.
Anyway, any suggestion on how to tackle the issue
that we cannot compute new DECL_ASSEMBLER_NAMEs after the frontend
is finished?
Fix up the deferred_asm_name list somewhere between the call to
c_common_write_pch and the call to free_lang_data. I guess this would
mean another debug hook for processing that needs to happen before
free_lang_data.
Or fix free_lang_data to deal with these types, too.
Or use your first patch, and decide that we don't care about the linkage
name of unreachable types. What types are affected by this, anyway?
Jason