This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11136] gcc -m64 creates incorrect code for passing parameters which are structs
- From: "briant at model dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2003 16:33:05 -0000
- Subject: [Bug c/11136] gcc -m64 creates incorrect code for passing parameters which are structs
- References: <20030609191138.11136.briant@model.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11136
------- Additional Comments From briant@model.com 2003-06-10 16:33 -------
Subject: Re: gcc -m64 creates incorrect code for passing parameters
which are structs
Sorry for the mess up.
The C source file is attached.
Would you also like me to update the bugzilla report #11136 with the C file?
Regards, Brian Taylor
ebotcazou@gcc.gnu.org wrote:
>PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11136
>
>
>ebotcazou@gcc.gnu.org changed:
>
> What |Removed |Added
>----------------------------------------------------------------------------
> Status|UNCONFIRMED |WAITING
>
>
>------- Additional Comments From ebotcazou@gcc.gnu.org 2003-06-10 06:25 -------
>The attached file appears to be truncated. I suspect that doing "uuencode foo
>foo" is not very safe.
>
>And if the C source file includes only standard header files, you can post it as-is.
>
>
>
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>
>
#include <stdio.h>
typedef struct {
double val;
char is_null;
} rect;
rect recnull = {0.0, 1};
void rec6(rect r1, rect r2, rect r3, rect r4, rect r5, rect r6)
{
fprintf(stderr, "rec6: r1 val %g is_null 0x%x\n", r1.val, r1.is_null);
fprintf(stderr, "rec6: r2 val %g is_null 0x%x\n", r2.val, r2.is_null);
fprintf(stderr, "rec6: r3 val %g is_null 0x%x\n", r3.val, r3.is_null);
fprintf(stderr, "rec6: r4 val %g is_null 0x%x\n", r4.val, r4.is_null);
fprintf(stderr, "rec6: r5 val %g is_null 0x%x\n", r5.val, r5.is_null);
fprintf(stderr, "rec6: r6 val %g is_null 0x%x\n", r6.val, r6.is_null);
return;
}
int main(int argc, char **argv)
{
rect r1, r2, r3, r4, r5, r6;
r1 = recnull;
r2.val = 9.2; r2.is_null = 0;
r3.val = 9.3; r3.is_null = 0;
r4 = recnull;
r5 = recnull;
r6.val = 9.6; r6.is_null = 0;
fprintf(stderr, "r1 val %g is_null 0x%x\n", r1.val, r1.is_null);
fprintf(stderr, "r2 val %g is_null 0x%x\n", r2.val, r2.is_null);
fprintf(stderr, "r3 val %g is_null 0x%x\n", r3.val, r3.is_null);
fprintf(stderr, "r4 val %g is_null 0x%x\n", r4.val, r4.is_null);
fprintf(stderr, "r5 val %g is_null 0x%x\n", r5.val, r5.is_null);
fprintf(stderr, "r6 val %g is_null 0x%x\n", r6.val, r6.is_null);
rec6(r1, r2, r3, r4, r5, r6);
return 0;
}