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]


> From: Paul Schlie <schlie@comcast.net>
>> 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.
> 
> 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 there's some reliable way to
> easily identify and repair such bugs, rather than allowing them to remain
> latent?)

I wonder if there's some reasonable way to identify all memory references
inserted into trees/rtx that have not had memory attributes copied to them?
(As all such memory references by definition will have lost the properties
 associated with the object they reference it would seem?)




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