This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Your change to expr.c
- To: law at cygnus dot com
- Subject: Re: Your change to expr.c
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Tue, 2 Nov 99 05:26:28 EST
- Cc: gcc-patches at gcc dot gnu dot org
> 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.)