This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Static inline functions disappearing in new port (fixed)
- From: Alleged Judas <allegedjudas at yahoo dot co dot uk>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 8 Nov 2003 21:26:28 +0000 (GMT)
- Subject: Re: Static inline functions disappearing in new port (fixed)
I wrote:
> I have a problem in my port of GCC to a custom
> architecture, where functions declared static inline
> are sometimes not inlined, and their code is not
> emitted. [...]
> If compiled to assembly language, the code for
> mainGtU, etc. is not there, though a call
instruction > is generated to that code. Increasing
the inline
> limit 'solves' the problem by forcing the functions
> inline.
For the sake of posterity, this problem turned out to
be because I was not calling "assemble_name"
(varasm.c) from several of my tm.h macros, instead
outputting the names directly. Apparently this
function has a really important side-effect (a call to
mark_referenced) which prevents unreferenced code (and
data) from being emitted -- or referenced code, if you
don't use it.
Cheers,
Julian
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk