[LLVMbugs] [Bug 2662] New: apparent integer codegen bug

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Aug 10 20:47:20 PDT 2008


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

           Summary: apparent integer 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 seen on r54603 on Ubuntu Hardy on ia32.

regehr at john-home:~/volatile/tmp1$ llvm-gcc -O0 small.c -o small
regehr at john-home:~/volatile/tmp1$ ./small
4
regehr at john-home:~/volatile/tmp1$ llvm-gcc -O1 small.c -o small
regehr at john-home:~/volatile/tmp1$ ./small
32770

regehr at john-home:~/volatile/tmp1$ cat small.c
#include <stdio.h>

volatile unsigned short g_3;

void func_1 (void);
void func_1 (void)
{
  short l_2;
  for (l_2 = 0; l_2 <= 0; l_2 -= 3)
    {
      g_3 = (l_2 + l_2);
    }
}

int
main (void)
{
  func_1 ();
  printf ("%d\n", g_3);
  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