[LLVMbugs] [Bug 2487] New: loop codegen bug

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jun 22 20:06:48 PDT 2008


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

           Summary: loop codegen bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            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


This is for svn 52617 targeting ia32 hosted on Ubuntu Hardy.

[regehr at babel tmp25]$ llvm-gcc -Wall -fwrapv -O0 small.c -o small
[regehr at babel tmp25]$ ./small
1
[regehr at babel tmp25]$ llvm-gcc -Wall -fwrapv -O1 small.c -o small
[regehr at babel tmp25]$ ./small
0


int g_6;
void func_1 (void);
void func_1 (void)
{
  char l_3;
  for (l_3 = 0; l_3 >= 0; ++l_3) {
    if (!l_3) {
      for (g_6 = 1; 0; --g_6);
    }
  }
}

int main (void)
{
  func_1 ();
  printf ("%d\n", g_6);
  return 0;
}


-- 
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