This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Irix calling conventions for complex numbers
- From: "Billinghurst, David (CALCRTS)" <david dot billinghurst at comalco dot riotinto dot com dot au>
- To: "Eric Christopher" <echristo at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>,"Richard Sandiford" <rsandifo at redhat dot com>
- Date: Wed, 7 Jul 2004 17:36:47 +1000
- Subject: 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