[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#366377: marked as done (gcc-4.1: does not optimize sibling calls with args)

Your message dated Mon, 08 May 2006 22:46:34 +0200
with message-id <87psiockid.fsf@debian.org>
and subject line Bug#366377: gcc-4.1: does not optimize sibling calls with args
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
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]:

  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)
        call    foo

which doesn't correctly convert the call to foo into a tail call.

   ---> Drake Wilson

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11

Versions of packages gcc-4.1 depends on:
ii  binutils             2.16.1cvs20051214-1 The GNU assembler, linker and bina
ii  cpp-4.1              4.1.0-2             The GNU C preprocessor
ii  gcc-4.1-base         4.1.0-2             The GNU Compiler Collection (base 
ii  libc6                2.3.6-7             GNU C Library: Shared libraries
ii  libgcc1              1:4.1.0-2           GCC support library

-- no debconf information

--- End Message ---
--- Begin Message ---
Drake Wilson <drake@libcom.com> writes:

> Glargh.  You're right.  I thought the calling convention would permit
> it but it doesn't.  Stupid me.
> At least the resolved bug report can stand as a warning to future
> submitters, I suppose... close at will.



--- End Message ---

Reply to: