Oh, I see. The inlining causes an "almost" static definition for the locals in the functions. As someone else said, the reuse of the stack is disabled.
Wow, that's a good reason to avoid use of local variables in inlined functions. If it's possible. :( Yuck! Best regards, Stu Bell DataPlay (DPHI, Inc.) -----Original Message----- From: Paulo Marques [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 9:07 AM To: Stu Bell Cc: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] Stack usage under heavy inlining Hi, Stu Stu Bell wrote: > I don't understand your problem. If I understand your situation, you > have: You missed the "..._then_ function C _and then_ function D..." part :) So my example would look more like: static int functionB(void) { uint8_t localB[32]; ... } static int functionC(void) { uint8_t localC[32]; ... } static int functionD(void) { uint8_t localD[32]; ... } int functionA( int a ) { functionB(); functionC(); functionD(); } When gcc inlines all the functions into functionA it allocates 96 bytes of stack, because it isn't capable of reusing the stack space anymore. -- Paulo Marques Software Development Department - Grupo PIE, S.A. Phone: +351 252 290600, Fax: +351 252 290601 Web: www.grupopie.com "Who is general Failure and why is he reading my disk?" _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list