This is the mail archive of the
mailing list for the GCC project.
Re: static inline functions disappear - incorrect static initialiser analysis?
- From: James E Wilson <wilson at specifixinc dot com>
- To: Daniel Towner <daniel dot towner at picochip dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 20 Apr 2005 19:20:51 -0700
- Subject: Re: static inline functions disappear - incorrect static initialiser analysis?
- References: <42651FCE.firstname.lastname@example.org>
Daniel Towner wrote:
This no longer appears to be the case? `assemble_name' is still called
with `fn', and correctly marks `fn' as being referenced, but no body is
-fno-unit-at-a-time might help. This disables some of the cgraph
optimizations. This will probably go away eventually.
Do I now need to do something more than just calling
assemble_name to get gcc to output the function body in such a case?
No. cgraph should determine by itself that the function is needed. The
assemble_name call shouldn't be relevant here.
/* ??? If the assembler name is set by hand, it is possible to assemble
the name later after finalizing the function and the fact is noticed
in assemble_name then. This is arguably a bug. */
I think this is referring to use of __asm__ to change the name of a
function in unexpected ways. It doesn't have anything to do with your
What you should do here is pick a target that works, and debug cgraph to
see how it works. Then debug your target to see why it doesn't.
The sequence of events should be something like:
1) We walk the tree for main, and note that main calls fn.
2) We emit main because it is extern.
3) We then emit everything that main calls, which includes fn.
I won't hazard a guess as to what is wrong, as I don't see how this
could be failing.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com