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]
Other format: [Raw text]

Re: Fix for recent execute/20010123-1.c regression on ppc-eabi


    > In general that's right, but this case is when it's being applied to a
    > REG.  In that case, you compute the value of the REG once, so it is in
    > this case.

    ???  I don't see why a REG would necessarily be stored only once.  In
    fact, most REGs get stored many times.

Yes, but I meant that the case here was when there was a REG that was the
result of an expression.  Expressions are normally values and hence
readonly.

    >       struct s *t = & (struct s) { 3, "hey there" };

    > (1) Is that even valid?  Isn't the thing that we're taking the address of
    > allowed to be in readonly memory since it's a constan?

    Yes, this is valid.  GCC is required to create a writable temporary
    which has life for the basic block.

So even though it's an expression, it can be an lvalue?  Seems odd to
me, but if the way it's defined, I guess we have to live with it.


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