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



             Bug #: 55498

           Summary: [devirt] trunk fails inline-devirt test #6

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: m...@use.net





Created attachment 28799

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28799

test case that fails in trunk but passed with Maxim's devirt patches. added a

loop to induce 'hotness' of the path versus the original test case.



With current trunk, inline-devirt-6.C (attached) fails to fully inline the

one() and two() indirect functions returned by the strategy functions. This did

work with Maxim's patches from November/2011.



0000000000400480 <main>:

  400480:       41 55                   push   r13

  400482:       41 54                   push   r12

  400484:       55                      push   rbp

  400485:       53                      push   rbx

  400486:       48 83 ec 08             sub    rsp,0x8

  40048a:       e8 e1 01 00 00          call   400670 <_Z3onev>

  40048f:       0f b6 e8                movzx  ebp,al

  400492:       44 8d 6d 01             lea    r13d,[rbp+0x1]

  400496:       e8 f5 01 00 00          call   400690 <_Z3twov>

  40049b:       89 ee                   mov    esi,ebp

  40049d:       0f b6 d8                movzx  ebx,al

  4004a0:       bf 60 07 40 00          mov    edi,0x400760

  4004a5:       31 c0                   xor    eax,eax

  4004a7:       44 8d 63 01             lea    r12d,[rbx+0x1]

  4004ab:       e8 b0 ff ff ff          call   400460 <printf@plt>

  4004b0:       44 89 ee                mov    esi,r13d

  4004b3:       bf 5c 07 40 00          mov    edi,0x40075c

  4004b8:       31 c0                   xor    eax,eax

  4004ba:       e8 a1 ff ff ff          call   400460 <printf@plt>

Reply via email to