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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 
17:10:31 UTC ---
We already do

  /* We re-compute BLOCK_SUBBLOCKS of our parent here instead
     of streaming it.  For non-BLOCK BLOCK_SUPERCONTEXTs we still
     stream the child relationship explicitly.  */
  if (BLOCK_SUPERCONTEXT (expr)
      && TREE_CODE (BLOCK_SUPERCONTEXT (expr)) == BLOCK)
    {
      BLOCK_CHAIN (expr) = BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr));
      BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr)) = expr;
    }

so adding a

  if (BLOCK_SUPERCONTEXT (expr)
      && TREE_CODE (BLOCK_SUPERCONTEXT (expr)) == FUNCTION_DECL)
    DECL_INITIAL (BLOCK_SUPERCONTEXT (expr)) = expr;

shouldn't be too bad - but it does not fixe the testcase ... (but
DECL_INITIAL is now filled in correctly - I bet without VAR_DECLs
though).

Reply via email to