Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Marty Leisner
Fri, 18 Dec 1992 16:54
Bug passing arguments in inline?
Author: Marty Leisner
Date: Fri, 18 Dec 1992 16:54
Date: Fri, 18 Dec 1992 16:54
54 lines
1365 bytes
1365 bytes
I thing this is a bug.
I'm using gcc 2.3.2 on SunOS sparcs 4.1.2
This is my program:
static void inline test_args()
{
}
main()
{
test_args(0);
test_args();
test_args(2);
}
This is my command line (although I think -finline-functions isn't necessary in this case)
It seems if an argument is passed, the function is called...(even though its empty).
I'm not fluent in sparc assembler -- the moves occur after the call?
This is the assembly output:
gcc2_compiled.:
text
.align 4
.global _main
.proc 04
_main:
!#PROLOGUE# 0
save %sp,-136,%sp
!#PROLOGUE# 1
call ___main,0
nop
call _test_args,0
mov 0,%o0
call _test_args,0
mov 2,%o0
ret
restore
.align 4
.proc 020
_test_args:
!#PROLOGUE# 0
save %sp,-112,%sp
!#PROLOGUE# 1
ret
restore
--
marty
leisner.henr801c@xerox.com leisner@eso.mc.xerox.com
Member of the League for Programming Freedom
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads