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

[Bug rtl-optimization/60452] [4.8/4.9 Regression] wrong code at -O1 on x86_64-linux-gnu (affecting trunk and 4.8.x)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60452

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This also happens for regular objects on stack, i.e. with a MEM_EXPR:

int a;

int
main (void)
{
  char e[3] = { 0, 0, 0 }, f = 0;
  if (a == 131072)
    f = e[a];
  return f;
}

But I think that using MEM_OFFSET would be too conservative as well, for
example if the MEM_EXPR is a structure with a flexible array member.  So I
think that we should go for something based on the real offset from SFP/HPF/SP
and the value of get_frame_size plus some bias, even if there might be a gap
with the actual end of the frame, that doesn't really matter.


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