public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16446] New: Irix calling conventions for complex numbers
@ 2004-07-09  3:12 billingd at gcc dot gnu dot org
  2004-07-09  3:43 ` [Bug target/16446] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: billingd at gcc dot gnu dot org @ 2004-07-09  3:12 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2004-08-19 19:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09  3:12 [Bug c/16446] New: Irix calling conventions for complex numbers billingd at gcc dot gnu dot org
2004-07-09  3:43 ` [Bug target/16446] " pinskia at gcc dot gnu dot org
2004-07-15  2:05 ` billingd at gcc dot gnu dot org
2004-07-18 12:32 ` rsandifo at gcc dot gnu dot org
2004-07-18 13:19 ` rsandifo at gcc dot gnu dot org
2004-07-18 21:53 ` billingd at gcc dot gnu dot org
2004-07-18 21:54 ` billingd at gcc dot gnu dot org
2004-07-18 22:07 ` billingd at gcc dot gnu dot org
2004-07-18 22:08 ` billingd at gcc dot gnu dot org
2004-07-18 22:11 ` billingd at gcc dot gnu dot org
2004-07-18 22:12 ` billingd at gcc dot gnu dot org
2004-07-19 17:13 ` rsandifo at gcc dot gnu dot org
2004-07-19 17:16 ` rsandifo at gcc dot gnu dot org
2004-07-20  1:50 ` billingd at gcc dot gnu dot org
2004-07-28 23:59 ` billingd at gcc dot gnu dot org
2004-07-29  6:04 ` rsandifo at redhat dot com
2004-08-01 23:36 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-08-02  9:40 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-08-05  0:02 ` billingd at gcc dot gnu dot org
2004-08-14  7:37 ` rsandifo at gcc dot gnu dot org
2004-08-14 14:36 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-08-19 18:44 ` cvs-commit at gcc dot gnu dot org
2004-08-19 19:01 ` rsandifo at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).