[Bug lto/46911] [4.6 Regression] ICE: SIGSEGV in add_name_and_src_coords_attributes (dwarf2out.c:17792) with -flto -g

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 19 17:22:00 GMT 2011


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?)



More information about the Gcc-bugs mailing list