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 middle-end/49519] [4.7 Regression] Revision 175272 miscompiled 447.dealII in SPEC CPU 2006


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

--- Comment #30 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-12 08:42:40 UTC ---
> This patch seems too conservative and it appears that it will cause the
> compiler to miss all tailcalls with pointer arguments.  It only matters if the
> register points to the incoming parameters, which can only  happen in unusual
> cases.  We should be able to determine that reliably.

This is a bit of an overstatement though, as

extern int foo (int, int *);

int i;

int bar (int a, int b)
{
  int *p = &i;
  return foo (a, p);
}

will be caught.  Even this

extern int foo (int, int);

int i;

int bar (int a, int b)
{
  int *p = &i;
  return foo (a, *p);
}

will be caught thanks to alias analysis at the Tree level.

As for the "reliably", this time it's a little optimistic IMO. :-)  But we can
probably be less conservative with more work.


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