Article View: gnu.gcc.bug
Article #1567Bug passing arguments in inline?
From: 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
Technical Details
Message-ID:
<1992Dec18.165415.12740@spectrum.xerox.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!wrc.xerox.COM!leisnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!wrc.xerox.COM!leisner From: leisner@wrc.xerox.COM ( Marty Leisner) Subject: Bug passing arguments in inline? Message-ID: <1992Dec18.165415.12740@spectrum.xerox.com> Sender: gnulists@ai.mit.edu Reply-To: leisner@eso.mc.xerox.com Organization: Xerox Distribution: gnu Date: Fri, 18 Dec 1992 16:54:15 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 55