This is the mail archive of the gcc@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: Irix calling conventions for complex numbers


Here is my test program.  It is modelled on some of the test cases
in gcc.dg.  The fact that the output is (1.000,0.000) makes me wonder.
Host is an Origin 300 running IRIX 6.5.22m


#include <stdio.h>

extern double creal (double _Complex);
extern double cimag (double _Complex);
extern double _Complex cpow (double _Complex, double _Complex cpow);

int main()
{
  _Complex double t, t1;
  t = 2 + 3.0i;
  t1 = cpow (t, 2);
  printf ("%f\t%f\n", creal (t),  cimag (t));
  printf ("%f\t%f\n", creal (t1), cimag (t1));
}


Built with yesterday's HEAD (with patch to reorg.c - see gcc-bugs)

/disk4/billingd/obj/gcc-j/gcc/xgcc -B/disk4/billingd/obj/gcc-j/gcc 
  -I/disk4/billingd/obj/gcc-j/gcc/include -o use_cpow use_cpow.c -lm

Output is:

2.000000        3.000000
1.000000        0.000000


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