This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]