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: Richard Sandiford <rsandifo at redhat dot com>
- To: "Billinghurst, David (CALCRTS)"<david dot billinghurst at comalco dot riotinto dot com dot au>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 08 Jul 2004 07:33:09 +0100
- Subject: Re: Irix calling conventions for complex numbers
- References: <8ED2FA87C8ACC04192709688DDFD5F5F09B358@calttsv025.cal.riotinto.org>
David, thanks for all your work on this!
I should probably mention that it's been very difficult for me test to
_Complex stuff on irix. For one thing, I've only got access to 6.5.12m,
which doesn't seem to provide many of the complex libm functions. Even a
simple testcase like this:
> #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));
> }
fails to compile for me due to lack of cpow() in libm.
Also, the version of MIPSpro I use isn't much help for compat.exp-style
testing since it (a) doesn't include the Fortran compiler and (b) doesn't
handle _Complex properly. Any attempt to use _Complex results in:
### Compiler Error during Front End Driver phase:
### Invalid machine type BETYPE_0 in Make_Complex
cc INTERNAL ERROR: /usr/lib32/cmplrs/fec returned non-zero status 1
But I suspect from your description that we're mishandling the argument
passing side of things (as opposed to the return value). I'll try to
look into it soon.
Richard