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 c/11451] New: [m32r-elf] wrong code with -O at cmp_ne_small_const_insns


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [m32r-elf] wrong code with -O at
                    cmp_ne_small_const_insns
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: inaoka dot kazuhiro at renesas dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m32r-elf

m32r-elf-gcc 3.3 Released. 3.2.3

Commandline
m32r-elf-gcc -S -O bugcase.c

Bug pattern:

int func( int i )
{
  int ret=0;
  if ( i ) ret = 1;
  return ret;
}
 

wrong code:
    .section .text
    .balign 4
    .global func
    .type   func, @function
func:
    ; PROLOGUE, vars= 0, regs= 0, args= 0, extra= 0
    addi r0, #0   <=== NG 
    ; EPILOGUE
    jmp lr
    .size  func, .-func
    .ident "GCC: (GNU) 3.3"


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