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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-23 
13:34:25 UTC ---
There are several issues.  First as Jakub noted we have a NULL DECL_INITAL
for the inlined __MAIN.  If we fix that during LTO streaming (avoiding direct
input/output of DECL_INITIAL of all FUNCTION_DECLs) we run into the issue
that cgraph sets DECL_INITIAL of __MAIN to error_mark_node after inlining
it (assuming that debug_hooks->outlining_inline_function did everything that
was necessary already).  We can try to avoid this by setting
abstract_and_needed in the cgraph node.

Together this solves this ICE.  It doesn't solve PR47799 though.

This is because how we split trees between the global and the function-local
sections during streaming.  We end up with multiple copies of the abstract
BLOCK tree as well as bogus cross-function references for all abstract
origins (apart from that to the function-decl itself).

Reply via email to