always use pseudo return regs

Jeffrey Oldham oldham@codesourcery.com
Fri May 25 09:32:00 GMT 2001


The 23May patch
( http://gcc.gnu.org/ml/gcc-patches/2001-05/msg01629.html ) to
gcc/function.c causes gcc 3.1 for mips-sgi-irix6.5 to crash on test
cases gcc.c-torture/compile/981007-1.c and
gcc.c-torture/execute/complex-3.c.

Reversing the patch permits successful compilation for both (attached)
preprocessed sources using a Linux->Irix cross compiler.

Would you please modify the patch so these test cases compile
correctly?

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
# 1 "/users/joldham/pooma/dev4/gcc/gcc/testsuite/gcc.c-torture/execute/complex-3.c"
struct complex
{
  float r;
  float i;
};

struct complex cmplx (float, float);

struct complex
f (float a, float b)
{
  struct complex c;
  c.r = a;
  c.i = b;
  return c;
}

main ()
{
  struct complex z = f (1.0, 0.0);

  if (z.r != 1.0 || z.i != 0.0)
    abort ();
  exit (0);
}


More information about the Gcc-patches mailing list