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: [PATCH] Fix PR optimization/11210


On Mon, 2003-06-30 at 01:22, Eric Botcazou wrote:
> So the function is able to look through NOP_EXPRs to find the correct bitpos, 
> but not the correct bitsize! What's the rationale for this semantics?

I see your point now.  You are right, this is a problem.  pbitsize is
set at the beginning, and then we strip off NOP_EXPRs that can change
the bitsize, but we don't update pbitsize.  This is a bug.  This means
the function probably only works correct if you strip off NOP_EXPRs, but
it is likely that all of the callers are already doing this.  This helps
explain why we got funny results in decode_field_reference when we tried
using STRIP_SIGN_NOPS.

This code goes all of the way back to gcc-2.0, so the problem has been
there for a very long time.

So a ??? comment does make sense here, but it should be specific about
the pbitsize problem.

Jim



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