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 middle-end/55499] New: [devirt] trunk fails to eliminate dead functions where all call sites were inlined


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

             Bug #: 55499
           Summary: [devirt] trunk fails to eliminate dead functions where
                    all call sites were inlined
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


When compiling inline-devirt-1.C, all inlining happens correctly but the
function bodies remain, with or without whole-program, with or without renaming
main to main2 (and compiling as a shared lib):

g++-4.8 -fwhole-program -O3 -funroll-loops inline-devirt-1.C

0000000000400810 <_ZN10CalculableD1Ev>:
  400810:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400817:       c3                      ret    
  400818:       0f 1f 84 00 00 00 00    nop    DWORD PTR [rax+rax*1+0x0]
  40081f:       00 

0000000000400820 <_ZN1X9calculateEv>:
  400820:       b8 01 00 00 00          mov    eax,0x1
  400825:       c3                      ret    
  400826:       66 2e 0f 1f 84 00 00    nop    WORD PTR cs:[rax+rax*1+0x0]
  40082d:       00 00 00 

0000000000400830 <_ZN1Y9calculateEv>:
  400830:       b8 02 00 00 00          mov    eax,0x2
  400835:       c3                      ret    
  400836:       66 2e 0f 1f 84 00 00    nop    WORD PTR cs:[rax+rax*1+0x0]
  40083d:       00 00 00 

0000000000400840 <_ZN1YD1Ev>:
  400840:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400847:       c3                      ret    
  400848:       0f 1f 84 00 00 00 00    nop    DWORD PTR [rax+rax*1+0x0]
  40084f:       00 

0000000000400850 <_ZN1XD1Ev>:
  400850:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400857:       c3                      ret    
  400858:       0f 1f 84 00 00 00 00    nop    DWORD PTR [rax+rax*1+0x0]
  40085f:       00 

0000000000400860 <_ZN10CalculableD0Ev>:
  400860:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400867:       e9 94 fd ff ff          jmp    400600 <_ZdlPv@plt>
  40086c:       0f 1f 40 00             nop    DWORD PTR [rax+0x0]

0000000000400870 <_ZN1YD0Ev>:
  400870:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400877:       e9 84 fd ff ff          jmp    400600 <_ZdlPv@plt>
  40087c:       0f 1f 40 00             nop    DWORD PTR [rax+0x0]

0000000000400880 <_ZN1XD0Ev>:
  400880:       48 c7 07 d0 09 40 00    mov    QWORD PTR [rdi],0x4009d0
  400887:       e9 74 fd ff ff          jmp    400600 <_ZdlPv@plt>
  40088c:       0f 1f 40 00             nop    DWORD PTR [rax+0x0]


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