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

--- Comment #11 from Jan Hubicka <hubicka at ucw dot cz> ---
> 
> I guess the FE needs the info.  But yes, dropping TREE_READONLY
> for TYPE_NEEDS_CONSTRUCTION decls at some point may make sense.
> 
> Generally it would be nice to know (for alias analysis) that
> an object is not written to via a pointer.  For const globals
> with a constructor such writes can only happen inside the global
> ctor function(s).  Not sure if IPA reference could be of help

If I have global ctor of C++ readonly structure, I would expect to be
able to call external function to construct its parts that may call back
to the unit, so it seems to me that we can not track much?

If the ctor is leaf we probably can track down the info, but won't
currently. It is soemthing that ipa-ref could try to do if it was not
lame.

Reply via email to