[Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 9 15:21:00 GMT 2012


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

             Bug #: 54876
           Summary: [4.8 Regression] LTO bootstrap broken, streaming
                    garbage-collected BLOCK
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
                CC: dehao@gcc.gnu.org, jamborm@gcc.gnu.org


We are streaming a GCed TREE_BLOCK of

(gdb) p expr->base.code
$5 = MEM_REF
(gdb) p expr->base.code
$6 = ADDR_EXPR

from output_node_opt_summary here:

      /* At the moment we assume all old trees to be PARM_DECLs, because we
have no
         mechanism to store function local declarations into summaries.  */
      gcc_assert (parm);
      streamer_write_uhwi (ob, parm_num);
      gcc_assert (EXPR_LOCATION (map->new_tree) == UNKNOWN_LOCATION);
      stream_write_tree (ob, map->new_tree, true);

we need to clear all TREE_BLOCKs from this.  Not sure if new_tree originates
from a tree that eventually comes along prune_expression_for_jf, but

static tree
prune_expression_for_jf (tree exp)
{
  if (EXPR_P (exp))
    {
      exp = unshare_expr (exp);
      SET_EXPR_LOCATION (exp, UNKNOWN_LOCATION);
    }
  return exp;
}

is not enough.  You need to walk_tree exp, as in this case it is &MEM_REF
and all sub-expressions can contain a location.



More information about the Gcc-bugs mailing list