Bug#366377: gcc-4.1: does not optimize sibling calls with args

2006-05-08 Thread Drake Wilson
Quoth Florian Weimer <[EMAIL PROTECTED]>, on 2006-05-08 19:45:21 +0200: > * Drake Wilson: > > > extern int foo(int x); > > int bar(void) { return foo(32); } > > > > On i386 this compiles to > > > > pushl %ebp > > movl%esp, %ebp > > subl$8, %esp > > mov

Bug#366377: gcc-4.1: does not optimize sibling calls with args

2006-05-08 Thread Florian Weimer
* Drake Wilson: > extern int foo(int x); > int bar(void) { return foo(32); } > > On i386 this compiles to > > pushl %ebp > movl%esp, %ebp > subl$8, %esp > movl$32, (%esp) > callfoo > leave > ret > > which doesn't correct

Bug#366377: gcc-4.1: does not optimize sibling calls with args

2006-05-07 Thread Drake Wilson
Package: gcc-4.1 Version: 4.1.0-2 Severity: normal Trying to write an argument-passing tail call to another function doesn't seem to get optimized with -foptimize-sibling-calls no matter which other optimization options I turn on. Example, to be run through [gcc -foptimize-sibling-calls -O9 -S]: