http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46911

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 
16:53:11 UTC ---
(In reply to comment #1)
> When dwarf2out_abstract_function is called on MAIN__, it doesn't have
> DECL_INITIAL set when in lto1 (compared to f951), the BLOCK tree is simply not
> present, which both causes incomplete debug information and for Fortran COMMON
> blocks ICEs, as it relies on those to be actually present.  P4 as it only
> affects Fortran, but if -flto -g is ever meant to be usable, the BLOCK trees
> need to be streamed out and preserved.  It seems output_function calls:
>   /* Output DECL_INITIAL for the function, which contains the tree of
>      lexical scopes.  */
>   lto_output_tree (ob, DECL_INITIAL (function), true);
> but for inlines output_function isn't called.

That's true.  Inlines would be reachable via the block trees abstract
origins, right?  We do stream that, so the only thing missing is
associating it with the function-decl ... (maybe we can do that
when reading the BLOCK and its context is a FUNCTION_DECL?)

Reply via email to