Thans for your comments guys, I'll follow your suggestions and try other examples and test additional options as well. I forgot to precise however that I used the option -os (optimizing for size) Regards Jorge In addition to the comments from Eric: On Wed, Nov 17, 2010 at 06:53:28PM +0100, Eric Botcazou wrote: > > I appreciate any feedback or suggestions you have about this, maybe I'm > > doing it all wrong from the begining, but the fact that inline increases > > the size of the code was weird to me. > > The inlining heuristics are complex and tuned for real programs, so it's > probably easy to fool them with toy examples. Modifying them generally > requires a lot of retuning efforts so isn't a small undertaking. If you are not happy with the way gcc inlines "by default", you can influence the inlining heuristics by many parameters / compile options, like: large-function-insns, large-function-growth, inline-unit-growth,... There is a long list in the manpage ;-) Axel