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]

Re: PATCH: Fix PR2758


    (What we desparately need is pseudo stack slots, like pseudo registers.
    That would be a much cleaner and much more robust way of allocating
    stack slots.)

The problem, though, is that the address computations for them would
not get properly optimized, depending on when they get instantiated into
real stack slots.

!       /* If the address of the structure varies, then it might be on
! 	 the stack.  And, stack slots may be shared across scopes.
! 	 So, two different structures, of different types, can end up
! 	 at the same location.  We will give the structures alias set
! 	 zero; here we must be careful not to give non-zero alias sets
! 	 to their fields.  */

This is very wrong.  Stack slots *do not* get reused for objects of
different alias sets, or at least there is code to prevent that.  If they
did, there would be far more wrong than this.

So something else is going on here.

Can you show me what's going on here in a way that does not require
knowlege of C++?  If so, I'll try to see what the real problem is here.

However, if this is just for the branch, then there's no point in
bothering with this right now.  But I don't like this change for the
mainline.


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