Article View: gnu.gcc.bug
Article #6350gcc 2.7.1 -fkeep-inline-functions doesn't keep them
From: Scott Schwartz
Date: Fri, 01 Dec 1995 00:00
Date: Fri, 01 Dec 1995 00:00
42 lines
1232 bytes
1232 bytes
From reading the Info page, I thought that
-fkeep-inline-functions should make sure that a copy of the function
appears on the object file. In 2.7.1, and maybe other versions, it
appears not to.
; gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/2.7.1/specs
gcc version 2.7.1
; cat x.c
inline extern int inc(int x) { return x+1; }
int main()
{
int i = inc(1);
printf("%d\n", i);
}
; gcc -O2 -fkeep-inline-functions -S x.c
; cat x.s
gcc2_compiled.:
___gnu_compiled_c:
.text
.align 8
LC0:
.ascii "%d\12\0"
.align 4
.global _main
.proc 04
_main:
!#PROLOGUE# 0
save %sp,-104,%sp
!#PROLOGUE# 1
call ___main,0
nop
sethi %hi(LC0),%o0
or %o0,%lo(LC0),%o0
call _printf,0
mov 2,%o1
ret
restore
Technical Details
Message-ID:
<95Dec1.165609est.12914@galapagos.cse.psu.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,23f27ed07a485d3b,start X-Google-Attributes: gid113d02,public From: schwartz@galapagos.cse.psu.edu (Scott Schwartz) Subject: gcc 2.7.1 -fkeep-inline-functions doesn't keep them Date: 1995/12/01 Message-ID: <95Dec1.165609est.12914@galapagos.cse.psu.edu> X-Deja-AN: 120710889 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.bug