On Wed, May 16, 2012 at 2:29 PM, Eric Botcazou <ebotca...@adacore.com> wrote: >> Right, and that's why we want your change to split the nested function >> into abstract and concrete instances. But then it should be fine to >> attach the abstract instance to the abstract parent normally, I would >> think. > > Indeed, this works, but I need to use function_possibly_abstracted_p instead > of > cgraph_function_possibly_inlined_p in gen_subprogram_die to get DW_AT_inline. > > Revised patch attached. It still generates the same (fixed) debug info for > the > reduced testcase. I'll do a full testing cycle if you're happy with it. > > > * dwarf2out.c (function_possibly_abstracted_p): New static function. > (gen_subprogram_die): Use it function_possibly_abstracted_p in lieu of > cgraph_function_possibly_inlined_p. > (gen_inlined_subroutine_die): Return if the origin is to be ignored. > (process_scope_var): Do not emit concrete instances of abstracted > nested functions from here. > (gen_decl_die): Emit the abstract instance if the function is possibly > abstracted and not only possibly inlined. > (dwarf2out_finish): Find the first non-abstract parent instance and > attach concrete instances on the limbo list to it. >
This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53860 -- H.J.