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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             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> ---
I will have a look.  We're getting

# VUSE <.MEM>
_2 = MEM[(struct A *)&&i].x;

when mapping &i into

  <bb 2> [local count: 1073741824]:
  _1 = MEM[(struct A *)&c].x;
  _2 = _1 != 0B;
  _4 = (int) _2;
  return _4;

here what's the difference is that 'c' is no longer TREE_ADDRESSABLE because
we can now mark it with DECL_NOT_GIMPLE_REG.

That means the "obvious" fix would be to amend the !TREE_ADDRESSABLE check in

  if (TREE_READONLY (p)
      && !TREE_ADDRESSABLE (p)
      && value
      && !TREE_SIDE_EFFECTS (value)
      && !def)

with a !DECL_NOT_GIMPLE_REG check.

Reply via email to