Memory aliasing and stack slots

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sun May 28 05:47:00 GMT 2000


    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.


More information about the Gcc mailing list