------- Comment #1 from jakub at gcc dot gnu dot org 2010-02-26 12:10 -------
So, the problem seems to be in the equivalencing of VALUEs. val_resolve does:
1659 /* Map incoming equivalences. ??? Wouldn't it be nice if
1660 we just started sharing the location lists? Maybe a
1661 circular list ending at the value itself or some
1662 such. */
1663 set_variable_part (set, dv_as_value (node->dv),
1664 dv_from_value (val), node->offset,
1665 VAR_INIT_STATUS_INITIALIZED, NULL_RTX, INSERT);
1666 set_variable_part (set, val, node->dv, node->offset,
1667 VAR_INIT_STATUS_INITIALIZED, NULL_RTX, INSERT);
1668 }
VALUE 2:2 is initially equivalenced to VALUE 13:13, so we have:
(value/s/u:SI 13:13 @0x17167e0/0x1719c10)
offset 0
(value/s/u:SI 2:2 @0x17166d8/0x1718ac0)
(value/s/u:SI 2:2 @0x17166d8/0x1718ac0)
offset 0
(value/s/u:SI 13:13 @0x17167e0/0x1719c10)
with cur_loc in the latter 13:13. Then %ebx is added to the list of locations,
then %eax is added too, then %ebx is removed again. But cur_loc remains 13:13,
doesn't change, and therefore variable_was_changed is never called on this.
I guess we want to either not record these equivalences into cur_loc at all, or
at least prefer other locations whenever possible. Not sure how exactly to
recognize them though. Alex?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43176