On 01/23/2015 01:45 PM, Aldy Hernandez wrote:
It would expect [the flush] to be before free_lang_data and LTO streaming.

The reason this wouldn't make a difference is because, as it stands,
dwarf for the clones are not generated until final.c:

   if (!DECL_IGNORED_P (current_function_decl))
     debug_hooks->function_decl (current_function_decl);

which happens after free_lang_data.

I agree that the current code doesn't have this effect, but we're talking about changing things, right? :)

Unfortunately, this sets DECL_ABSTRACT_P for the "static_p" above, and
refuses to unset it after the call to dwarf2out_decl.

Well, that sounds like a bug. Why isn't it being unset? Is it because DECL_ABSTRACT_P was already set for the function, so we don't call set_decl_abstract_flags (decl, 0)? Perhaps a solution to that would be to avoid calling set_decl_abstract_flags (decl, 1) if the function is already marked as abstract. Or to teach set_decl_abstract_flags not to mess with static local variables.

Jason

Reply via email to