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

           Summary: Useless initialization of register
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: j...@gcc.gnu.org


For arm-eabi target and options "-O2 -funroll-loops", gcc compiles the
following empty function

foo()
{
}

to

foo:
        mov     r0, #0
        bx      lr

Apparently the first instruction is useless.

Reply via email to