This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: PR rtl-optimization/15248 -- semi-latent reload bug]


> Bernd Schmidt
> Ok, I had a look around this code. I'm worried about relying on MEM_READONLY_P
> - it seems to me that if a user has a regular non-const pointer to ROM, we can
> inadvertently produce writes to it even if the source code only ever does
> reads.

But the since all memory references to static-const/literal-data should be
properly identified by MEM_REAONLY_P, presuming they may not would only seem
to mask such a latent bug (which should arguably be exposed, not hidden)?

Although I understand the concern as pointers are occasionally
inconsistently manipulated without properly tracking the properties of
the original memory reference they represent, which includes some of the
string move optimizations, etc.. (However, hopefully some reliable way to
easily identify and repair such bugs, rather than allowing them to remain
latent?)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]