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: [tree-ssa] fix Bugs 15109, 15108, 14472 and most likely 14440



On May 6, 2004, at 20:05, Steven Bosscher wrote:


Hi,
	* tree-tailcall.c (process_assignment): Look through NOP_EXPRs.
	(find_tail_calls): Likewise.

Steven,


This is wrong for 32bit big endian targets and long long's.
This fails on powerpc-apple-darwin (and most likely every 32bit
big endian targets):

long long __attribute__((noinline)) t()
{
  return 0xFF00;
}

int __attribute__((noinline)) f()
{
  return t();
}

int main()
{
  if (f() != 0xFF00)
    abort();
  return 0;
}


To fix it you most likely just have to check for to see if the return type of the function
which is being sibcalled is greater than the size (precession) that is returned.


Thanks,
Andrew Pinski


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