Bug 20545 - unnecessary operations in tailcall
Summary: unnecessary operations in tailcall
Status: RESOLVED DUPLICATE of bug 13822
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-18 21:59 UTC by Thomas Koenig
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2005-03-18 21:59:32 UTC
$ cat output-block.c
int flush_output(void)
{
    return add_block();
}

$ gcc -O3 -S output-block.c
$ cat output-block.s
        .file   "output-block.c"
        .text
        .p2align 4,,15
.globl flush_output
        .type   flush_output, @function
flush_output:
        pushl   %ebp
        movl    %esp, %ebp
        popl    %ebp
        jmp     add_block
        .size   flush_output, .-flush_output
        .ident  "GCC: (GNU) 4.1.0 20050315 (experimental)"
        .section        .note.GNU-stack,"",@progbits

The operations on ebp aren't necessary.
Comment 1 Andrew Pinski 2005-03-18 22:06:07 UTC
-fomit-frame-pointer "fixes" the problem, well this option really should be enabled by default and that 
is PR 13822 which I am marking this bug as a dup of.

*** This bug has been marked as a duplicate of 13822 ***