[LLVMbugs] [Bug 2364] New: likely integer codegen bug

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun May 25 12:06:48 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2364

           Summary: likely integer codegen bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


Using svn 51558 on Ubuntu Feisty on x86-32 this code is miscompiled:

int func_6 (void)
{
  int i = 0;
  char x;
  for (x = 0;
       (x != 12);
       x -= 4) {
    i++;
  }
  return i;
}

llvm-gcc -fwrapv -O1 -S -o - small.c -Wall -fomit-frame-pointer

gives:

func_6:
        movl    $253, %eax
        ret

I believe the correct result is 61.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list