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 rtl-optimization/47763] New: Useless initialization of register


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: unassigned@gcc.gnu.org
        ReportedBy: jiez@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.


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