[Bug rtl-optimization/13730] Calls through function pointer at -fpic not optimized to call through PLT when possible

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jul 18 04:11:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-18 04:11 -------
It is a direct call now on the mainline:
bar:
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ebx
        call    __i686.get_pc_thunk.bx
        addl    $_GLOBAL_OFFSET_TABLE_, %ebx
        subl    $4, %esp
        call    baz@PLT
        popl    %eax
        popl    %ebx
        popl    %ebp
        ret

Which is good as you with -fpic I see as there no way to get sibcalling with -fpic (even with a direct 
call).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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



More information about the Gcc-bugs mailing list