This is the mail archive of the gcc-bugs@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 Jun 7 change to expand_expr


Unfortunately, I haven't managed to get the Ada testcase to fail yet.
However, I have been studying it, and I am convinced that it is the same
problem that is shown by execute/980506-2.c.

Setting MEM_IN_STRUCT_P in the INDIRECT_REF case of expand_expr is not the
right way to try to fix this.

My suggestion is that we add a second bit to track whether a reference is
varying or not.  This will be a lot of work, but should fix the problem without
losing any optimizations.

Another suggestion we had was to add a bit to indicate whether MEM_IN_STRUCT_P
was valid.  This would likely be easier to implement, and it is easier to
see that it will work, but we will lose some optimizations.  Note that we
would probably have to set this bit unconditionally in expand_expr in the
INDIRECT_REF case.

Another suggestion we had was to just delete the MEM_IN_STRUCT_P aliasing code,
but we would lose a lot of optimizations if we did that, so I don't think that
is practical.

Jim


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