This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16446] New: Irix calling conventions for complex numbers
- From: "billingd at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2004 03:12:06 -0000
- Subject: [Bug c/16446] New: Irix calling conventions for complex numbers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It is likely that the calling conventions for complex numbers are wrong for
mips-sgi-irix6.5.
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 2004-07-0x HEAD
/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
Comment from Richard Sandiford is that "we're mishandling the argument
passing side of things (as opposed to the return value)."
See the discussion:
http://gcc.gnu.org/ml/gcc/2004-07/msg00300.html
http://gcc.gnu.org/ml/gcc/2004-07/msg00366.html
http://gcc.gnu.org/ml/gcc/2004-07/msg00369.html
--
Summary: Irix calling conventions for complex numbers
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: billingd at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: mips-sgi-irix6.5
GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5
OtherBugsDependingO 16322
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16446