https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103851

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Indeed what gimple_ranger::export_global_ranges does is a bit iffy but we
shouldn't have SSA names not in the free list with a NULL def stmts.

The SSA name in question is allocated here:

 #2  0x000000000135e968 in clear_padding_type (buf=0x7fffffffaeb0, 
    type=<array_type 0x7ffff66d9738>, sz=96, for_auto_init=true)
    at /home/rguenther/src/gcc3/gcc/gimple-fold.c:4774
4774              tree end = make_ssa_name (TREE_TYPE (buf->base));

it's defining stmt is cleared via move_sese_region_to_fn doing in
replace_ssa_name

      /* Now that we've used the def stmt to define new_name, make sure it
         doesn't define name anymore.  */
      SSA_NAME_DEF_STMT (name) = NULL;

but we expect those SSA names to be released later but that only happens when
gimple_in_ssa_p:

  if (gimple_in_ssa_p (cfun))
    { 
      /* We need to release ssa-names in a defined order, so first find them,
         and then iterate in ascending version order.  */
      bitmap release_names = BITMAP_ALLOC (NULL);
      vars_map.traverse<void *, gather_ssa_name_hash_map_from> (release_names);
      bitmap_iterator bi;
      unsigned i;
      EXECUTE_IF_SET_IN_BITMAP (release_names, 0, i, bi)
        release_ssa_name (ssa_name (i));

Reply via email to