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 target/40718] Invalid code produced with -foptimize-sibling-calls



------- Comment #11 from ubizjak at gmail dot com  2009-08-23 12:08 -------
Patched gcc compiles testcase from comment 8 to:

_ZN5Stuff8do_stuffEmm:
.LFB4:
        .cfi_startproc
        .cfi_personality 0x0,__gxx_personality_v0
        pushl   %ebp
        .cfi_def_cfa_offset 8
        movl    %esp, %ebp
        .cfi_offset 5, -8
        .cfi_def_cfa_register 5
        pushl   %ebx
        subl    $4, %esp
        movl    12(%ebp), %eax
        cmpl    $-2, %eax
        je      .L2
        .cfi_offset 3, -12
        movl    glo_ptr_to_base, %edx
        movl    (%edx), %ebx
        movl    %edx, 8(%ebp)
        movl    (%ebx), %edx
        movl    -4(%ebp), %ebx
        leave
        .cfi_remember_state
        .cfi_restore 5
        .cfi_def_cfa 4, 4
        .cfi_restore 3
        jmp     *%edx
.L2:
        .cfi_restore_state
        movl    -4(%ebp), %ebx
        leave
        .cfi_restore 5
        .cfi_def_cfa 4, 4
        .cfi_restore 3
        ret     $12
        .cfi_endproc


-- 


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


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