------- Comment #5 from hjl dot tools at gmail dot com  2008-07-04 14:40 -------
Xuepeng, revision 137460 fixes both local variables
and incoming arguments on 32bit.  But it still fails
incoming arguments on 64bit:

bash-3.2$ ./xgcc -B./  -g /tmp/foo.c
bash-3.2$ gdb foo
GNU gdb Fedora (6.8-10.fc9)
...
(gdb) b foo
Breakpoint 1 at 0x4004ac: file /tmp/foo.c, line 7.
(gdb) r
Starting program: /export/build/gnu/gcc-stack/build-x86_64-linux/gcc/a.out 

Breakpoint 1, foo (dummy1=0, dummy2=4195829, dummy3=750006345, dummy4=1, 
    dummy5=0, dummy6=4195211, size=702562328) at /tmp/foo.c:7
7       {
Missing separate debuginfos, use: debuginfo-install glibc.x86_64
(gdb) next
8         volatile char * ptr=__builtin_alloca(size);
(gdb) 
11        xxx = 2;
(gdb) 
12        ptr [1]= 30;
(gdb) p xxx
$1 = 2
(gdb) p ptr [1]
$2 = 63 '?'
(gdb) next
13        printf ("%d: %d\n", xxx, ptr [1]);
(gdb) p ptr [1]
$3 = 30 '\036'
(gdb) p size
$4 = -14032866
(gdb)

The difference on 64bit is the first 6 integer parameters
are passed in register and the rest on stack. Can you look into
it? Thanks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36728

Reply via email to