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]

Re: Memory aliasing and stack slots


    If X and Y share the same stack slot, it seems to me that they should be
    in the same alias set. 

The alias set of an object is determined by its type and two objects of
different types can be assigned the same stack slot at different times.

    Do you know if it is possible to determine that X and Y share the
    same stack slot?

In general it's not.  Consider taking the address and passing it
through a const function that returns a pointer to the stucture.

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