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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |hubicka at gcc dot gnu.org
      Known to fail|                            |10.0, 8.3.0, 9.2.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 7+ abort at -O0 already, GCC 4.8.5 only with optimization.  We fold the
const_var read to 3 (oops).  But the testcase also makes sure that the
read wouldn't be CSEd over the call to bar().

With symbol interposition it would be valid to interpose const var
with a non-const one as well, no?  (IIRC that came up in another bug
where we concluded we can ignore that)

So the thing is to fix constant folding and guide alias analysis when
we can safely assume a call doesn't modify a TREE_READONLY variable.

Reply via email to