[Bug ipa/108445] [13 Regression] Address expression on global variable is not normalized

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 18 13:51:44 GMT 2023


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So if we have shared &gArray for

  5.  # DEBUG p => &gArray
  7.  _10 = MEM[(int *)&gArray];

then we'll effectively wrap the MEM[(int *)&gArray] which we didn't do before
(and whether we do depends on the order of streaming the stmts!)

Plus we're undoing the wrapping depending on context so any sharing here
is prohibitive I guess.

One way out is to unshare at the point of wrapping (I don't see how
the unsharing in remap_ssa_name reliably prevents the issue?  Ah,
it avoids the sharing of the ADDR_EXPR when inlining foo()).

I guess for GCC 13 I'm going to revert this change, eventually revisiting the
LTO streaming thing for stage1.


More information about the Gcc-bugs mailing list