This is the mail archive of the gcc@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: gcc.c-torture/unsorted/pass.c: what is it supposed to test?


On Fri, 2004-02-27 at 12:19, Joseph S. Myers wrote:

> > What is happening here is that the aliasing code is not marking 'w' nor
> > 'q' as call-clobbered because their addresses are casted to int, and so
> > no valid pointer holds their address.  So, we mark the call to foo as a
> > tail call and then fail later in the back end with:
> 
> Casting a pointer to intptr_t (which may be int) *is* a valid way of
> passing it to other functions.  So is printing it to a file with printf
> %p, casting to intptr_t and printing it to a file as an integer, or
> looking at the bits of the pointer and scattering them about memory.
>
But the real question that the aliasing code is interested in is: Can
the intptr_t object be dereferenced?  If yes, then we should represent
intptr_t objects as pointers in GIMPLE.  We can't make these language
dependent assumptions inside the optimizers.

If not, then treating address assignments to intptr_t as escaping is
still the right thing to do.


Diego.


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