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: Your change to expr.c


      > Where it gets *really* confusing, though, is when the same temp slot is
      > used for two different "constant" variables: there you actually *can*
      > have multiple writes and the semantics of the result is confusing, at
      > best.  I agree this is very muddled, but don't see a way to make it
      > cleaner.  Do you?

    Don't reuse the stack slot like that.  The additional stack usage is
    minimal compared to the pain to make this kind of stuff work.

Well, first of all, we'd need to add some mechanism not to reuse it.
But secondly, the usage is not the minimal for Ada, where there are a lot
of block-local temporaries that are constants.

However, this basically "works", though it a bit unclean, so I don't
think we need to do anything.  (I thought about simply not setting
RTX_UNCHANGING_P for temp slots, but that causes worse problems since
you can take the address of a temp slot and reference it via a type
that is readonly or, even worse, has some readonly components.)


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