This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11304] [3.3 Regression] Wrong code production with -fomit-frame-pointer


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11304


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
            Summary|Wrong code production with -|[3.3 Regression] Wrong code
                   |fomit-frame-pointer         |production with -fomit-
                   |                            |frame-pointer


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-24 11:10 -------
On the mainline (20030623) I get correct code:
tin:~/src/gnu/gcctest>gcc -O2 -fomit-frame-pointer -S -o - pr11304.c -march=i386 -
mtune=i386
        .file   "pr11304.c"
        .text
        .p2align 2,,3
.globl hux
        .type   hux, @function
hux:
        pushl   %ebx
        subl    $8, %esp
        movl    16(%esp), %ebx
        testl   %ebx, %ebx
        je      .L2
        subl    $12, %esp
        pushl   $4
        call    foo
        addl    $16, %esp
        addl    $8, %esp
        movl    %ebx, %eax    ;<--- here eax is reloaded
        popl    %ebx
        ret
        .p2align 2,,3
.L2:
        subl    $12, %esp
        pushl   $0
        call    failure_then_exit
        addl    $16, %esp
        addl    $8, %esp
        popl    %ebx
        ret
        .size   hux, .-hux
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4 20030623 (experimental)"

But in 3.3.1 (20030616), 3.2.2, and 3.2.3, I get the wrong code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]