------- Comment #8 from jakub at gcc dot gnu dot org  2009-09-19 10:50 -------
The "ret" string is shared between some attribute and a value from
CONST_STRING.
But prune_unused_types_walk_attribs resets the count to 0:
      /* Set the string's refcount to 0 so that prune_unused_types_mark
         accounts properly for it.  */
      if (AT_class (a) == dw_val_class_str)
        a->dw_attr_val.v.val_str->refcount = 0;
and while attributes are walked, location lists are not and thus nothing
notices it is still used.  I'll have to read the prune_unused_types stuff
carefully to understand how this can be fixed, ideally if we could just
decrement refcount in prune_unused_types_walk_attribs, as long as we are sure
it is walked for all attributes, it could fix this.  Alternatively we'd have to
walk all location lists as well, looking for labels for strings.


-- 


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

Reply via email to