This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47438] New: function arguments memory alignment problem.
- From: "dbms007 at hanmail dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jan 2011 16:58:26 +0000
- Subject: [Bug c/47438] New: function arguments memory alignment problem.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47438
Summary: function arguments memory alignment problem.
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dbms007@hanmail.net
parameter memory aligment problem in 64 bit gcc compiler.
example )
int Test1(tranNo, name, path, sSpId, spId, spPg, type, size, parm)
long tranNo;
char* name, *path;
short sSpid, spId, spPg, type;
long size;
char* parm;
{
printf("----------- size : %ld\n", size);
}
int Test2(tranNo, name, path, sSpId, spId, spPg, size, type, parm)
long tranNo;
char* name, *path;
short sSpid, spId, spPg;
long size;
short type;
char* parm;
{
printf("----------- size : %ld\n", size);
}
main()
{
int xx = 7974288;
Test1(xx);
Test2(xx);
}
compiler option
gcc -O -m64 test.c
Above program u can see the different result output .
i think that some of passing parament causes memory alignment problem..
I like to know which version can solve that problem ?
please answer me asap ..