public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/102148] New: ppc64le: homogeneous float arguments are not passed correctly
@ 2021-08-31 18:29 zlwang at ca dot ibm.com
  2021-09-01 15:13 ` [Bug target/102148] " dje at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zlwang at ca dot ibm.com @ 2021-08-31 18:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102148

            Bug ID: 102148
           Summary: ppc64le: homogeneous float arguments are not passed
                    correctly
           Product: gcc
           Version: 8.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zlwang at ca dot ibm.com
  Target Milestone: ---

example program:

typedef struct {
        float a[2];
} sub;
typedef struct {float b; sub c; float d;} R;
extern R func(long,R,float,int);
R v = {0, {1,2}, 3};

double ma() {
        R rv = func(77,v,88,99);
        return rv.d;
}


Since R is a homogeneous float aggregate with less than 8 elements, func
argument passing should look like the following function:

func(long, float, float, float, float, float, int)

But they are not. At least for gcc8.4.1, the latter's long/int are passed in r3
and r9 respectively; while the former's long/int are passed in r3 and r7
respectively.

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

end of thread, other threads:[~2021-09-01 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 18:29 [Bug c/102148] New: ppc64le: homogeneous float arguments are not passed correctly zlwang at ca dot ibm.com
2021-09-01 15:13 ` [Bug target/102148] " dje at gcc dot gnu.org
2021-09-01 20:00 ` zlwang at ca dot ibm.com
2021-09-01 20:03 ` zlwang at ca dot ibm.com
2021-09-01 20:04 ` wschmidt at gcc dot gnu.org
2021-09-01 20:18 ` wschmidt at gcc dot gnu.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).