The attached file and the output of gcc -O2 -S illustrate the problem. The inlining of logarg seems to have resulted in a second buffer, which is only ever written to.
-- Summary: Unnecessary use of stack space Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg at netbsd dot org GCC host triplet: i386--netbsdelf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29215