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

           Summary: another math bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


This looks a lot like PR 3275 but it is still wrong in r61912 on Ubuntu Hardy
on x86.

LLVM up to and including r59527 gets this right, since then it is wrong.

reg...@john-home:~/volatile/tmp112$ llvm-gcc -O0 small.c -o small
reg...@john-home:~/volatile/tmp112$ ./small
-1
reg...@john-home:~/volatile/tmp112$ llvm-gcc -O1 small.c -o small
reg...@john-home:~/volatile/tmp112$ ./small
10
reg...@john-home:~/volatile/tmp112$ cat small.c
#include <stdio.h>

unsigned g_9;

void func_1 (void);
void func_1 (void)
{
  for (g_9 = 11; g_9 < (unsigned)-8; g_9--)
    {
    }
}

int
main (void)
{
  func_1 ();
  printf ("%d\n", g_9);
  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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to